Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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;
        }
Пример #5
0
        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;
        }
Пример #6
0
        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;
        }
Пример #7
0
        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;
        }