private static Month AsyncUpdateMonth(string year, System.ComponentModel.BackgroundWorker backgroundWorker) { SalesServiceSoapClient ss = new SalesServiceSoapClient(); //实例化web服务对象 Month month = new Month(); //实例化对应表的实体(model)对象 month = ss.SelectSalGrade(year, user_id); return(month); }
private static void MountAdded(SaleGrade salegrade, System.ComponentModel.BackgroundWorker backgroundWorker) { SalesServiceSoapClient ss = new SalesServiceSoapClient();//实例化web服务对象 //调用web服务中的添加 string message = ss.AddSalesGrade(salegrade); MessageBox.Show(message, "信息提示", MessageBoxButton.OK, MessageBoxImage.Information); }
private static void Added(Sale sale, System.ComponentModel.BackgroundWorker backgroundWorker) { sale.sal_pwd = Commons.EncodeHelper.AES_Encrypt(sale.sal_pwd); SalesServiceSoapClient ss = new SalesServiceSoapClient();//实例化web服务对象 //调用web服务中的添加 string message = ss.AddSales(sale); MessageBox.Show(message, "信息提示", MessageBoxButton.OK, MessageBoxImage.Information); }
private void ID_search_btn_Click(object sender, RoutedEventArgs e) { SalesServiceSoapClient ss = new SalesServiceSoapClient();//实例化web服务对象 DataTable dt = ss.GetSalesInfo(ID_search.Text, Name_search.Text, Class_search.Text, Sex_search.Text, Age_search.Text); dt.Columns[0].ColumnName = "代号"; dt.Columns[1].ColumnName = "姓名"; dt.Columns[2].ColumnName = "组"; dt.Columns[3].ColumnName = "性别"; dt.Columns[4].ColumnName = "年龄"; dt.Columns[5].ColumnName = "联系方式"; data.DataContext = dt.DefaultView; }
public Edit() { InitializeComponent(); SalesServiceSoapClient ss = new SalesServiceSoapClient();//实例化web服务对象 DataTable dt = ss.GetSalesInfo(ID_search.Text, Name_search.Text, Class_search.Text, Sex_search.Text, Age_search.Text); dt.Columns[0].ColumnName = "代号"; dt.Columns[1].ColumnName = "姓名"; dt.Columns[2].ColumnName = "组"; dt.Columns[3].ColumnName = "性别"; dt.Columns[4].ColumnName = "年龄"; dt.Columns[5].ColumnName = "联系方式"; data.DataContext = dt.DefaultView; }
public EditSal() { InitializeComponent(); SalesServiceSoapClient ss = new SalesServiceSoapClient();//实例化web服务对象 DataTable dt = ss.GetSalesInfo(sal_no, "", "", "", ""); dt.Columns[0].ColumnName = "代号"; dt.Columns[1].ColumnName = "姓名"; dt.Columns[2].ColumnName = "组"; dt.Columns[3].ColumnName = "性别"; dt.Columns[4].ColumnName = "年龄"; dt.Columns[5].ColumnName = "联系方式"; data.DataContext = dt.DefaultView; }
private void ok_btn_Click(object sender, RoutedEventArgs e) { SalesServiceSoapClient ss = new SalesServiceSoapClient(); DataTable dt = new DataTable(); dt = ((DataView)data.ItemsSource).Table; dt.Columns[0].ColumnName = "sal_no"; dt.Columns[1].ColumnName = "sal_name"; dt.Columns[2].ColumnName = "sal_class"; dt.Columns[3].ColumnName = "sal_sex"; dt.Columns[4].ColumnName = "sal_age"; dt.Columns[5].ColumnName = "sal_number"; string message = ss.UpdataSalesInfo(dt); MessageBox.Show(message); dt.Columns[0].ColumnName = "代号"; dt.Columns[1].ColumnName = "姓名"; dt.Columns[2].ColumnName = "组"; dt.Columns[3].ColumnName = "性别"; dt.Columns[4].ColumnName = "年龄"; dt.Columns[5].ColumnName = "联系方式"; data.DataContext = dt.DefaultView; }