//设置 private void btnSet_Click(object sender, EventArgs e) { if (txtCost.Text.Trim().Length == 0) { MessageBox.Show("输入修改后的基础销售工费"); return; } if (cbk.SelectedCount == 0) { MessageBox.Show("请选择要修改的款式"); return; } string Pm_Ids = cbk.GetKeyIds("PM_Id"); string[] strKey = "EUser_Id,EDept_Id,Fy_Id,WeightFee,AmoutFee,UnitType,Key_Ids,Flag".Split(",".ToCharArray()); string[] strVal = new string[] { CApplication.App.CurrentSession.UserId.ToString(), CApplication.App.CurrentSession.DeptId.ToString(), CApplication.App.CurrentSession.FyId.ToString(), txtCost.Text.Trim(), txtCost.Text.Trim(), cboUnitFee.SelectedIndex.ToString().Trim(), Pm_Ids, "202" }; DataSet dsUpdate = this.DataRequest_By_DataSet(strSpName, strKey, strVal); if (dsUpdate.Tables[0].Rows[0][0].ToString() == "OK") { for (int i = 0; i < gridVMain.RowCount; i++) { if (cbk.IsRowSelected(i)) { if (cboUnitFee.SelectedIndex.ToString().Trim() == "0") { gridVMain.SetRowCellValue(i, "WeightFee", txtCost.Text.Trim()); } else { gridVMain.SetRowCellValue(i, "AmoutFee", txtCost.Text.Trim()); } } } } cbk.ClearSelection(); MessageBox.Show("设置成功"); txtCost.Text = string.Empty; }
private void btnSet_Click(object sender, EventArgs e) { if (txtMergePNumber.Text.Trim().Length == 0) { MessageBox.Show("请输入合并后的款号"); txtMergePNumber.Focus(); return; } if (cbk.SelectedCount == 0) { MessageBox.Show("请选择要修改的款式"); return; } string Pm_Ids = cbk.GetKeyIds("PM_Id"); string[] strKey = "EUser_Id,EDept_Id,Fy_Id,MergePNumber,Key_Ids,flag".Split(",".ToCharArray()); string[] strVal = new string[] { CApplication.App.CurrentSession.UserId.ToString(), CApplication.App.CurrentSession.DeptId.ToString(), CApplication.App.CurrentSession.FyId.ToString(), txtMergePNumber.Text.Trim(), Pm_Ids, "101" }; DataSet ds = this.DataRequest_By_DataSet(strSpName, strKey, strVal); if (ds.Tables[0].Rows[0][0].ToString() == "OK") { for (int i = 0; i < gridView1.RowCount; i++) { if (cbk.IsRowSelected(i)) { gridView1.SetRowCellValue(i, "MergePNumber", txtMergePNumber.Text.Trim()); } } } cbk.ClearSelection(); MessageBox.Show("合并成功"); txtMergePNumber.Text = string.Empty; }
private void btnCancel_Click(object sender, EventArgs e) { cbk.ClearSelection(); }