示例#1
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            if (DialogResult.OK == MessageBox.Show("您是否确认修改?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question))
            {
                if (Library.Lang.DataValidator.isNULL(dataGridViewX1.Rows[0].Cells["Price_01Plus"].Value))
                {
                    dataGridViewX1.Rows[0].Cells["Price_01Plus"].ErrorText = "必填";
                }
                if (Library.Lang.DataValidator.isNULL(dataGridViewX1.Rows[0].Cells["Price_01Plus"].Value, dataGridViewX1.Rows[0].Cells["Price_01Plus"].Value))
                {
                    return;
                }
                soso.syntoolSoapClient bll   = new soso.syntoolSoapClient();
                Maptool.soso.Link      model = new soso.Link();
                model.created = DateTime.Now;
                model.updated = model.created;
                model.id      = int.Parse(dataGridViewX1.Rows[0].Cells["Product_ID"].Value.ToString());
                model.iden    = this.iden;

                model.spid = dataGridViewX1.Rows[0].Cells["Product_ID"].ToolTipText;
                model.t_id = this.knid;
                if (bll.AddLink(model, Login.authKey))
                {
                    MessageBox.Show("操作成功!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    from1.Bind();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("您的登陆状态已经失效,请关闭后重新登陆!", "操作失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
示例#2
0
        private void dataGridViewX1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dataGridViewX1.Columns[0].Index)
            {
                if (DialogResult.OK == MessageBox.Show("您是否确认映射?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question))
                {
                    soso.syntoolSoapClient bll = new soso.syntoolSoapClient();

                    Maptool.soso.Link model = new soso.Link();
                    model.created = DateTime.Now;
                    model.updated = model.created;
                    model.id      = int.Parse(dataGridViewX1.Rows[e.RowIndex].Cells["Product_ID"].Value.ToString());
                    model.iden    = this.iden;
                    model.t_id    = this.Erp_ID;
                    if (bll.AddLink(model, Login.authKey))
                    {
                        MessageBox.Show("操作成功!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        from1.Bind();
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show("您可能已经映射过此供应商的数据!", "操作失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }