You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.0 KiB
69 lines
2.0 KiB
using SchedulingSystem.EntityClass; |
|
using SchedulingSystemClient; |
|
using System; |
|
using System.Collections.Generic; |
|
using System.Linq; |
|
using System.Text; |
|
using System.Windows; |
|
using System.Windows.Controls; |
|
using System.Windows.Data; |
|
using System.Windows.Documents; |
|
using System.Windows.Input; |
|
using System.Windows.Media; |
|
using System.Windows.Media.Imaging; |
|
using System.Windows.Shapes; |
|
|
|
namespace SchedulingSystem |
|
{ |
|
/// <summary> |
|
/// XGGZSSLXWindow.xaml 的交互逻辑 |
|
/// </summary> |
|
public partial class XGGZSSLXWindow : Window |
|
{ |
|
public XGGZSSLXWindow(Cus_SslxQz row) |
|
{ |
|
InitializeComponent(); |
|
ssjbrow = row; |
|
} |
|
Cus_SslxQz ssjbrow = new Cus_SslxQz(); |
|
SurgerySchedulingEntities myModel = new SurgerySchedulingEntities(); |
|
Cus_SslxQz sslxlb = new Cus_SslxQz(); |
|
private void Window_Loaded(object sender, RoutedEventArgs e) |
|
{ |
|
sslx.Text = ssjbrow.SSLX.ToString(); |
|
djms.Text = ssjbrow.LXMS.ToString(); |
|
qz.Text = ssjbrow.QZ.ToString(); |
|
} |
|
private void btn_bc_Click(object sender, RoutedEventArgs e) |
|
{ |
|
int intqz; |
|
try |
|
{ |
|
intqz = Convert.ToInt32(qz.Text); |
|
} |
|
catch (Exception ) |
|
{ |
|
MessageBox.Show("请输入正确的权重格式"); |
|
return; |
|
} |
|
SYS_SSDJB sslxb = new SYS_SSDJB(); |
|
sslxb.ID = ssjbrow.ID; |
|
sslxb.SSDJ = sslx.Text; |
|
sslxb.DJMS = djms.Text; |
|
sslxb.QZ = intqz; |
|
try |
|
{ |
|
myModel.Entry(sslxb).State = System.Data.Entity.EntityState.Modified; |
|
myModel.SaveChanges(); |
|
MessageBox.Show("修改成功"); |
|
this.Close(); |
|
} |
|
catch (Exception) |
|
{ |
|
MessageBox.Show("修改失败"); |
|
} |
|
|
|
|
|
} |
|
} |
|
}
|
|
|