private void BtnOk_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtDepNo.Text)) { MessageBox.Show("部门编码不能为空!"); return; } if (_Edit == "ADD") { string _where = "and ShippingAddress.Company_Id='" + LoginInfo._Usr_Company + "' And isnull(ShippingAddress_Id,'')='" + this.txtDepNo.Text + "'"; if (!CommomHelper.Exists("ShippingAddress", _where)) { if (AddShippingAddress()) { this.DialogResult = DialogResult.Yes; } } else { MessageBox.Show("该地址已存在!"); return; } } else if (_Edit == "UPD") { if (UpdShippingAddress()) { this.DialogResult = DialogResult.Yes; } } }
private void BtnOk_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtNo.Text)) { MessageBox.Show("阶段编码不能为空!"); return; } if (_Edit == "ADD") { string _where = "and isnull(ProjectStage_Id,'')='" + this.txtNo.Text + "'"; if (!CommomHelper.Exists("ProjectStage", _where)) { if (AddProjectStage()) { this.DialogResult = DialogResult.Yes; } } else { MessageBox.Show("该项目阶段编码已存在!"); return; } } else if (_Edit == "UPD") { if (UpdateProjectStage()) { this.DialogResult = DialogResult.Yes; } } }
private void BtnOk_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtNo.Text)) { MessageBox.Show("仓库/仓位编码不能为空!"); return; } if (_Edit == "ADD") { string _where = "and Warehouse.Company_Id='" + LoginInfo._Usr_Company + "' And isnull(Warehouse_Id,'')='" + this.txtNo.Text + "'"; if (!CommomHelper.Exists("Warehouse", _where)) { if (AddWarehouse()) { this.DialogResult = DialogResult.Yes; } } else { MessageBox.Show("该仓库/仓位已存在!"); return; } } else if (_Edit == "UPD") { if (UpdateWarehouse()) { this.DialogResult = DialogResult.Yes; } } }
private void BtnOk_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtNo.Text)) { MessageBox.Show("物料单位编码不能为空!"); return; } if (_Edit == "ADD") { string _where = " And isnull(ItemUt_Id,'')='" + this.txtNo.Text + "'"; if (!CommomHelper.Exists("ItemUt", _where)) { if (AddItemUt()) { this.DialogResult = DialogResult.Yes; } } else { MessageBox.Show("该物料单位已存在!"); return; } } else if (_Edit == "UPD") { if (UpdateItemUt()) { this.DialogResult = DialogResult.Yes; } } }