private void DoOkS() { if (txtClassS.Text.Trim() == string.Empty) { return; } if (gridVSrc.SelectedRowsCount == 0) { MessageBox.Show("没有选中任何记录."); return; } string strKeyIds = string.Empty; foreach (int i in gridVSrc.GetSelectedRows()) { DataRow dr = gridVSrc.GetDataRow(i); strKeyIds += strKeyIds == string.Empty ? dr[strKeyFiled].ToString() : "," + dr[strKeyFiled].ToString(); } if (strKeyIds == string.Empty) { return; } List <string> lisSpParmValue = new List <string>(); string[] strKey = "ClassName,GroupName,strKeyIds,EUser_Id,EDept_Id,Fy_Id,flag".Split(",".ToCharArray()); lisSpParmValue.AddRange(new string[] { txtClassS.Text.Trim(), txtGroupNameS.Text.Trim(), strKeyIds, CApplication.App.CurrentSession.UserId.ToString(), CApplication.App.CurrentSession.DeptId.ToString(), CApplication.App.CurrentSession.FyId.ToString(), "122" }); DataSet dtAdd = this.DataRequest_By_DataSet(strSpName, strKey, lisSpParmValue.ToArray()); if (dtAdd == null) { return; } this.DialogResult = System.Windows.Forms.DialogResult.Yes; if (FrmEditorBaseP != null) { FrmEditorBaseP.RefreshItem(); } this.Close(); this.Dispose(); }
private void DoOkSets() { if (txtClassGv.Text.Trim() == string.Empty) { return; } frmDataTable.AcceptChanges(); string strField = string.Empty; string strValues = string.Empty; DataRow dr = frmDataTable.Rows[0]; strValues = StaticFunctions.GetAddValues(dr, strMainFileds, out strField); List <string> lisSpParmValue = new List <string>(); string[] strKey = "BusClass,DstMenuClass,ClassType,strFields,strFieldValues,EUser_Id,EDept_Id,Fy_Id,flag".Split(",".ToCharArray()); lisSpParmValue.AddRange(new string[] { dplClass.EditValue.ToString(), txtClassGv.Text, StrType, strField, strValues, CApplication.App.CurrentSession.UserId.ToString(), CApplication.App.CurrentSession.DeptId.ToString(), CApplication.App.CurrentSession.FyId.ToString(), Q_OR_E == "Q"?"2":"3" }); DataSet dtAdd = this.DataRequest_By_DataSet(strSpName, strKey, lisSpParmValue.ToArray()); if (dtAdd == null) { return; } this.DialogResult = System.Windows.Forms.DialogResult.Yes; if (FrmEditorBaseP != null) { FrmEditorBaseP.RefreshItem(); } this.Close(); this.Dispose(); }