FrmPriceFactorRange.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. using com.steering.pss.sale.price.entity;
  2. using Core.Mes.Client.Comm.Server;
  3. using Core.Mes.Client.Comm.Tool;
  4. using CoreFS.CA06;
  5. using Infragistics.Win.UltraWinEditors;
  6. using Infragistics.Win.UltraWinGrid;
  7. using System;
  8. using System.Collections;
  9. using System.Collections.Generic;
  10. using System.ComponentModel;
  11. using System.Data;
  12. using System.Drawing;
  13. using System.Linq;
  14. using System.Text;
  15. using System.Windows.Forms;
  16. using Core.Mes.Client.Comm.Format;
  17. using Core.Mes.Client.Comm.Control;
  18. namespace Core.StlMes.Client.SalePrice.BaseForm
  19. {
  20. public partial class FrmPriceFactorRange : FrmBase
  21. {
  22. string isValid = "1";
  23. public FrmPriceFactorRange()
  24. {
  25. InitializeComponent();
  26. }
  27. private void FrmPriceFactorRange_Load(object sender, EventArgs e)
  28. {
  29. EntityHelper.ShowGridCaption<SlmPriceFactorClassifyEntity>(gdFactorRange.DisplayLayout.Bands[0]);
  30. InitForm();
  31. }
  32. public override void ToolBar_Click(object sender, string ToolbarKey)
  33. {
  34. switch (ToolbarKey)
  35. {
  36. case "Query":
  37. QueryData();
  38. break;
  39. case "Save":
  40. SaveFormData();
  41. break;
  42. case "Delete":
  43. DeleteOrResume(true);
  44. break;
  45. case "Resume":
  46. DeleteOrResume(false);
  47. break;
  48. case "Close":
  49. this.Close();
  50. break;
  51. }
  52. }
  53. /// <summary>
  54. /// 查询数据
  55. /// </summary>
  56. private void QueryData()
  57. {
  58. string rangeId = "";
  59. string rangeName = "";
  60. if (labelTextBox1.Checked)
  61. rangeName = labelTextBox1.Text.Trim();
  62. if (labelTextBox2.Checked)
  63. rangeId = labelTextBox2.Text.Trim();
  64. List<SlmPriceFactorClassifyEntity> list = EntityHelper.GetData<SlmPriceFactorClassifyEntity>(
  65. "com.steering.pss.sale.price.server.CorePriceFactorRange.query", new object[] { rangeId, rangeName, isValid }, this.ob);
  66. slmPriceFactorClassifyEntityBindingSource.DataSource = list;
  67. UltraGridBand ugb = this.gdFactorRange.DisplayLayout.Bands[0];
  68. UltraGridColumn[] col = new UltraGridColumn[] { ugb.Columns["CLASSDNAME"]};
  69. GridHelper.RefreshAndAutoSizeExceptColumns(gdFactorRange, col);
  70. }
  71. /// <summary>
  72. /// 初始化数据
  73. /// </summary>
  74. private void InitForm()
  75. {
  76. //UltraComboEditor uce = new UltraComboEditor();
  77. //SalePriceClass.NitializeSignMin(uce);
  78. //gdFactorRange.DisplayLayout.Bands[0].Columns["factorMinSign"].EditorComponent = uce;
  79. //gdFactorRange.DisplayLayout.Bands[0].Columns["factorMinSign"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
  80. //this.Controls.Add(uce);
  81. //uce.Visible = false;
  82. //UltraComboEditor uce1 = new UltraComboEditor();
  83. //SalePriceClass.NitializeSignMax(uce1);
  84. //gdFactorRange.DisplayLayout.Bands[0].Columns["factorMaxSign"].EditorComponent = uce1;
  85. //gdFactorRange.DisplayLayout.Bands[0].Columns["factorMaxSign"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
  86. //this.Controls.Add(uce1);
  87. //uce1.Visible = false;
  88. //UltraComboEditor uce2 = new UltraComboEditor();
  89. //SalePriceClass.NitializeSignMin(uce2);
  90. //gdFactorRange.DisplayLayout.Bands[0].Columns["pertainMinSign"].EditorComponent = uce2;
  91. //gdFactorRange.DisplayLayout.Bands[0].Columns["pertainMinSign"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
  92. //this.Controls.Add(uce2);
  93. //uce2.Visible = false;
  94. //UltraComboEditor uce3 = new UltraComboEditor();
  95. //SalePriceClass.NitializeSignMax(uce3);
  96. //gdFactorRange.DisplayLayout.Bands[0].Columns["PertainMaxSign"].EditorComponent = uce3;
  97. //gdFactorRange.DisplayLayout.Bands[0].Columns["pertainMinSign"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
  98. //this.Controls.Add(uce3);
  99. //uce3.Visible = false;
  100. UltraComboEditor uce4 = new UltraComboEditor();
  101. SalePriceClass.InitComboEditorWithParm(uce4, "com.steering.pss.sale.price.server.CorePriceFactorRange.queryBaseInfo", "BASECODE", "BASENAME", this.ob, true, new object[] { "1228" });
  102. gdFactorRange.DisplayLayout.Bands[0].Columns["VERTYPE"].EditorComponent = uce4;
  103. gdFactorRange.DisplayLayout.Bands[0].Columns["VERTYPE"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
  104. this.Controls.Add(uce4);
  105. uce4.Visible = false;
  106. UltraComboEditor uce5 = new UltraComboEditor();
  107. SalePriceClass.InitComboEditorWithParm(uce5, "com.steering.pss.sale.price.server.CorePriceFactorRange.queryFacName", "FACTOR_ID", "FACTOR_NAME", this.ob, false, null);
  108. gdFactorRange.DisplayLayout.Bands[0].Columns["factorId"].EditorComponent = uce5;
  109. gdFactorRange.DisplayLayout.Bands[0].Columns["factorId"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
  110. this.Controls.Add(uce5);
  111. uce5.Visible = false;
  112. //UltraComboEditor uce6 = new UltraComboEditor();
  113. //SalePriceClass.InitComboEditorWithParm(uce6, "com.steering.pss.sale.price.server.CorePriceFactorRange.queryFacName", "FACTOR_ID", "FACTOR_NAME", this.ob, false, null);
  114. //gdFactorRange.DisplayLayout.Bands[0].Columns["pertainFactorId"].EditorComponent = uce6;
  115. //gdFactorRange.DisplayLayout.Bands[0].Columns["pertainFactorId"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
  116. //this.Controls.Add(uce6);
  117. //uce6.Visible = false;
  118. }
  119. /// <summary>
  120. /// 保存界面数据
  121. /// </summary>
  122. private void SaveFormData()
  123. {
  124. gdFactorRange.UpdateData();
  125. UltraGridRow[] row = gdFactorRange.Rows.AsQueryable().Where(a => a.Cells["CHK"].Value.ToString().ToUpper() == "TRUE").ToArray();
  126. if (row.Length <= 0)
  127. {
  128. MessageUtil.ShowWarning("请选择需要保存的数据!");
  129. return;
  130. }
  131. ArrayList parm = CheckFormData(row);
  132. if (parm == null || parm.Count <= 0)
  133. {
  134. return;
  135. }
  136. if (MessageUtil.ShowYesNoAndQuestion("是否确认保存数据!") == DialogResult.No) return;
  137. CoreClientParam ccp = new CoreClientParam();
  138. ccp.IfShowErrMsg = false;
  139. ccp.ServerName = "com.steering.pss.sale.price.server.CorePriceFactorRange";
  140. ccp.MethodName = "saveData";
  141. ccp.ServerParams = new object[] { parm, UserInfo.GetUserName() };
  142. ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  143. if (ccp != null)
  144. {
  145. if (ccp.ReturnCode == -1)
  146. {
  147. MessageUtil.ShowWarning(ccp.ReturnInfo);
  148. return;
  149. }
  150. MessageUtil.ShowTips("数据保存成功!");
  151. QueryData();
  152. }
  153. }
  154. /// <summary>
  155. /// 验证界面数据
  156. /// </summary>
  157. /// <param name="row">界面数据</param>
  158. /// <returns></returns>
  159. private ArrayList CheckFormData(UltraGridRow[] row)
  160. {
  161. ArrayList parm = new ArrayList();
  162. List<string> list = new List<string>();
  163. foreach (var uRow in row)
  164. {
  165. SlmPriceFactorClassifyEntity spf = (SlmPriceFactorClassifyEntity)uRow.ListObject;
  166. if (spf.Validflag == "无效" && spf.CreateName != "")
  167. {
  168. MessageUtil.ShowWarning("【" + spf.FactorId + "】的因素已经无效,不能修改!");
  169. return null;
  170. }
  171. if (spf.FactorId == "")
  172. {
  173. MessageUtil.ShowWarning("请输入【" + spf.FactorId + "】的因素名称!");
  174. return null;
  175. }
  176. if (spf.ClassDName == "")
  177. {
  178. MessageUtil.ShowWarning("请选择【" + spf.ClassDId + "】的范围名称!");
  179. return null;
  180. }
  181. //if (spf.ColumnKey == "")
  182. //{
  183. // MessageUtil.ShowWarning("请选择【" + spf.FactorId + "】的字段KEY!");
  184. // return null;
  185. //}
  186. //if (spf.FactorMaxVal!="" && !StringUtil.IsNumber(spf.FactorMaxVal))
  187. //{
  188. // MessageUtil.ShowWarning("因素最大值必须为数字");
  189. // return null;
  190. //}
  191. //if (spf.FactorMaxVal != "" && spf.FactorMaxSign=="")
  192. //{
  193. // MessageUtil.ShowWarning("因素上限值不为空,请输入因素上限值符号");
  194. // return null;
  195. //}
  196. //if (spf.FactorMinVal !="" && !StringUtil.IsNumber(spf.FactorMinVal))
  197. //{
  198. // MessageUtil.ShowWarning("因素最小值必须为数字");
  199. // return null;
  200. //}
  201. //if (spf.FactorMinVal != "" && spf.FactorMinSign == "")
  202. //{
  203. // MessageUtil.ShowWarning("因素下限值不为空,请输入因素下限值符号");
  204. // return null;
  205. //}
  206. //if (spf.PertainMaxVal !="" && !StringUtil.IsNumber(spf.PertainMaxVal))
  207. //{
  208. // MessageUtil.ShowWarning("附属因素最大值必须为数字");
  209. // return null;
  210. //}
  211. //if (spf.PertainMaxVal != "" && spf.PertainMaxSign == "")
  212. //{
  213. // MessageUtil.ShowWarning("附属因素上限值不为空,请输入附属因素上限值符号");
  214. // return null;
  215. //}
  216. //if (spf.PertainMinVal !="" && !StringUtil.IsNumber(spf.PertainMinVal))
  217. //{
  218. // MessageUtil.ShowWarning("附属因素最小值必须为数字");
  219. // return null;
  220. //}
  221. //if (spf.PertainMinVal != "" && spf.PertainMinSign == "")
  222. //{
  223. // MessageUtil.ShowWarning("附属因素下限值不为空,请输入附属因素下限值符号");
  224. // return null;
  225. //}
  226. //if (spf.SortNo.ToString()!="" && !StringUtil.IsNumber(spf.SortNo.ToString()))
  227. //{
  228. // MessageUtil.ShowWarning("序号必须为数字");
  229. // return null;
  230. //}
  231. //if (spf.PertainMaxSign!="" && spf.PertainMaxVal=="")
  232. //{
  233. // MessageUtil.ShowWarning("请输入附属因素最大值");
  234. // return null;
  235. //}
  236. //if (spf.PertainMinSign != "" && spf.PertainMinVal == "")
  237. //{
  238. // MessageUtil.ShowWarning("请输入附属因素最小值");
  239. // return null;
  240. //}
  241. //if (spf.FactorMaxSign != "" && spf.FactorMaxVal == "")
  242. //{
  243. // MessageUtil.ShowWarning("请输入因素最大值");
  244. // return null;
  245. //}
  246. //if (spf.FactorMinSign != "" && spf.FactorMinVal == "")
  247. //{
  248. // MessageUtil.ShowWarning("请输入因素最小值");
  249. // return null;
  250. //}
  251. //if (spf.FactorVal != "" && (spf.FactorMaxVal != "" || spf.FactorMinVal!=""))
  252. //{
  253. // MessageUtil.ShowWarning("因素值与上下限范围值不允许同时输入");
  254. // return null;
  255. //}
  256. //if (spf.FactorMinVal!="" && spf.FactorMaxVal!="")
  257. //{
  258. // if (Convert.ToDecimal(spf.FactorMinVal) > Convert.ToDecimal(spf.FactorMaxVal))
  259. // {
  260. // MessageUtil.ShowWarning("因素上限值必须大于因素下限值");
  261. // return null;
  262. // }
  263. //}
  264. //if (spf.PertainMaxVal!="" && spf.PertainMinVal!="")
  265. //{
  266. // if (Convert.ToDecimal(spf.PertainMinVal) > Convert.ToDecimal(spf.PertainMaxVal))
  267. // {
  268. // MessageUtil.ShowWarning("附属因素上限值必须大于附属因素下限值");
  269. // return null;
  270. // }
  271. //}
  272. if (spf.VerType == "")
  273. {
  274. MessageUtil.ShowWarning("请选择【" + spf.ClassDId + "】的版本类型!");
  275. return null;
  276. }
  277. //判断因素名称是否重复
  278. if (spf.Validflag == "") //新增
  279. {
  280. DataTable dt = ServerHelper.GetData("com.steering.pss.sale.price.server.CorePriceFactorRange.queryFacRNameByName", new object[] { spf.ClassDName }, this.ob);
  281. if (dt != null && dt.Rows.Count >= 1)
  282. {
  283. MessageUtil.ShowWarning("【" + spf.ClassDId + "】您输入的因素名称【" + spf.ClassDName + "】已存在!");
  284. return null;
  285. }
  286. }
  287. else
  288. {
  289. DataTable dt = ServerHelper.GetData("com.steering.pss.sale.price.server.CorePriceFactorRange.queryFacRNameById", new object[] { spf.ClassDId }, this.ob);
  290. if (dt != null && dt.Rows.Count > 0)
  291. {
  292. if (spf.ClassDName != dt.Rows[0][0].ToString())
  293. {
  294. DataTable dt1 = ServerHelper.GetData("com.steering.pss.sale.price.server.CorePriceFactorRange.queryFacRNameByName", new object[] { spf.ClassDName }, this.ob);
  295. if (dt1 != null && dt1.Rows.Count >= 1)
  296. {
  297. MessageUtil.ShowWarning("【" + spf.ClassDId + "】您输入的因素名称【" + spf.ClassDName + "】已存在!");
  298. return null;
  299. }
  300. }
  301. }
  302. }
  303. if (list.Contains(spf.ClassDName))
  304. {
  305. MessageUtil.ShowWarning("输入的因素名称重复!");
  306. return null;
  307. }
  308. else
  309. {
  310. list.Add(spf.ClassDName);
  311. }
  312. parm.Add(JSONFormat.Format(spf));
  313. }
  314. return parm;
  315. }
  316. private void gdFactorRange_AfterRowInsert(object sender, RowEventArgs e)
  317. {
  318. string maxId = gdFactorRange.Rows.AsQueryable().Max(a => a.Cells["ClassDId"].Value.ToString());
  319. if (maxId == "")
  320. {
  321. e.Row.Cells["ClassDId"].Value = "C000001";
  322. }
  323. else
  324. {
  325. string str = "C" + (Convert.ToInt32(maxId.Substring(1, 6)) + 1).ToString().PadLeft(6, '0');
  326. e.Row.Cells["ClassDId"].Value = str;
  327. }
  328. }
  329. private void gdFactorRange_AfterRowActivate(object sender, EventArgs e)
  330. {
  331. UltraGridRow uRow = gdFactorRange.ActiveRow;
  332. if (uRow != null)
  333. {
  334. gdFactorRange.UpdateData();
  335. if (Convert.ToBoolean(uRow.Cells["CHK"].Value))
  336. {
  337. uRow.Cells["ClassDName"].Activation = Activation.AllowEdit;
  338. uRow.Cells["sortNo"].Activation = Activation.AllowEdit;
  339. uRow.Cells["verType"].Activation = Activation.AllowEdit;
  340. //uRow.Cells["factorVal"].Activation = Activation.AllowEdit;
  341. //uRow.Cells["factorMinSign"].Activation = Activation.AllowEdit;
  342. //uRow.Cells["factorMinVal"].Activation = Activation.AllowEdit;
  343. //uRow.Cells["factorMaxSign"].Activation = Activation.AllowEdit;
  344. //uRow.Cells["factorMaxVal"].Activation = Activation.AllowEdit;
  345. //uRow.Cells["pertainFactorId"].Activation = Activation.AllowEdit;
  346. //uRow.Cells["pertainVal"].Activation = Activation.AllowEdit;
  347. //uRow.Cells["pertainMinSign"].Activation = Activation.AllowEdit;
  348. //uRow.Cells["pertainMinVal"].Activation = Activation.AllowEdit;
  349. //uRow.Cells["pertainMaxSign"].Activation = Activation.AllowEdit;
  350. //uRow.Cells["pertainMaxVal"].Activation = Activation.AllowEdit;
  351. uRow.Cells["FactorId"].Activation = Activation.AllowEdit;
  352. }
  353. else
  354. {
  355. uRow.Cells["ClassDName"].Activation = Activation.ActivateOnly;
  356. uRow.Cells["sortNo"].Activation = Activation.ActivateOnly;
  357. uRow.Cells["verType"].Activation = Activation.ActivateOnly;
  358. //uRow.Cells["factorVal"].Activation = Activation.ActivateOnly;
  359. //uRow.Cells["factorMinSign"].Activation = Activation.ActivateOnly;
  360. //uRow.Cells["factorMinVal"].Activation = Activation.ActivateOnly;
  361. //uRow.Cells["factorMaxSign"].Activation = Activation.ActivateOnly;
  362. //uRow.Cells["factorMaxVal"].Activation = Activation.ActivateOnly;
  363. //uRow.Cells["pertainFactorId"].Activation = Activation.ActivateOnly;
  364. //uRow.Cells["pertainVal"].Activation = Activation.ActivateOnly;
  365. //uRow.Cells["pertainMinSign"].Activation = Activation.ActivateOnly;
  366. //uRow.Cells["pertainMinVal"].Activation = Activation.ActivateOnly;
  367. //uRow.Cells["pertainMaxSign"].Activation = Activation.ActivateOnly;
  368. //uRow.Cells["pertainMaxVal"].Activation = Activation.ActivateOnly;
  369. uRow.Cells["FactorId"].Activation = Activation.ActivateOnly;
  370. }
  371. }
  372. }
  373. /// <summary>
  374. /// 删除或恢复
  375. /// </summary>
  376. /// <param name="flag"></param>
  377. private void DeleteOrResume(bool flag)
  378. {
  379. gdFactorRange.UpdateData();
  380. UltraGridRow[] row = gdFactorRange.Rows.AsQueryable().Where(a => a.Cells["CHK"].Value.ToString() == "True").ToArray();
  381. if (row.Length <= 0)
  382. {
  383. MessageUtil.ShowWarning("请选择需要" + (flag ? "删除" : "恢复") + "的数据!");
  384. return;
  385. }
  386. ArrayList parm = new ArrayList();
  387. if (flag)
  388. {
  389. foreach (var uRow in row)
  390. {
  391. SlmPriceFactorClassifyEntity spf = (SlmPriceFactorClassifyEntity)uRow.ListObject;
  392. if (spf.Validflag == "无效")
  393. {
  394. MessageUtil.ShowWarning("您勾选的数据中存在已删除的数据,不必重复删除!");
  395. return;
  396. }
  397. parm.Add(spf.ClassDId);
  398. }
  399. }
  400. else
  401. {
  402. foreach (var uRow in row)
  403. {
  404. SlmPriceFactorClassifyEntity spf = (SlmPriceFactorClassifyEntity)uRow.ListObject;
  405. if (spf.Validflag == "有效")
  406. {
  407. MessageUtil.ShowWarning("您勾选的数据中存在有效的数据,不必进行恢复!");
  408. return;
  409. }
  410. //恢复前判断是否存在相同因素名称的数据
  411. DataTable dt = ServerHelper.GetData("com.steering.pss.sale.price.server.CorePriceFactorRange.canResume", new object[] { spf.ClassDId, spf.ClassDName }, this.ob);
  412. if (dt != null && dt.Rows.Count > 0)
  413. {
  414. MessageUtil.ShowWarning("系统已存在名称为【" + spf.ClassDName + "】并且有效的因素范围,不能恢复!");
  415. return;
  416. }
  417. parm.Add(spf.ClassDId);
  418. }
  419. }
  420. if (MessageUtil.ShowYesNoAndQuestion("是否" + (flag ? "删除" : "恢复") + "所选的数据!") == DialogResult.No) return;
  421. CoreClientParam ccp = new CoreClientParam();
  422. ccp.ServerName = "com.steering.pss.sale.price.server.CorePriceFactorRange";
  423. ccp.MethodName = "deleteOrResume";
  424. ccp.ServerParams = new object[] { parm, UserInfo.GetUserName(), flag };
  425. ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  426. if (ccp != null)
  427. {
  428. if (ccp.ReturnCode != -1)
  429. {
  430. MessageUtil.ShowTips("数据" + (flag ? "删除" : "恢复") + "成功!");
  431. QueryData();
  432. }
  433. }
  434. }
  435. private void chkValid_CheckedChanged(object sender, EventArgs e)
  436. {
  437. if (chkValid.Checked)
  438. {
  439. isValid = "0";
  440. }
  441. else
  442. {
  443. isValid = "1";
  444. }
  445. }
  446. private void gdFactorRange_InitializeRow(object sender, InitializeRowEventArgs e)
  447. {
  448. if (e.Row.Cells["VALIDFLAG"].Value.ToString() == "无效")
  449. {
  450. e.Row.Appearance.ForeColor = Color.Red;
  451. }
  452. else
  453. {
  454. e.Row.Appearance.ForeColor = Color.Black;
  455. }
  456. }
  457. private void gdFactorRange_CellChange(object sender, CellEventArgs e)
  458. {
  459. if (e.Cell.Column.Key.ToUpper().Equals("CHK"))
  460. {
  461. if (Convert.ToBoolean(e.Cell.Text))
  462. {
  463. e.Cell.Row.Cells["ClassDName"].Activation = Activation.AllowEdit;
  464. e.Cell.Row.Cells["sortNo"].Activation = Activation.AllowEdit;
  465. e.Cell.Row.Cells["verType"].Activation = Activation.AllowEdit;
  466. //e.Cell.Row.Cells["factorVal"].Activation = Activation.AllowEdit;
  467. //e.Cell.Row.Cells["factorMinSign"].Activation = Activation.AllowEdit;
  468. //e.Cell.Row.Cells["factorMinVal"].Activation = Activation.AllowEdit;
  469. //e.Cell.Row.Cells["factorMaxSign"].Activation = Activation.AllowEdit;
  470. //e.Cell.Row.Cells["factorMaxVal"].Activation = Activation.AllowEdit;
  471. //e.Cell.Row.Cells["pertainFactorId"].Activation = Activation.AllowEdit;
  472. //e.Cell.Row.Cells["pertainVal"].Activation = Activation.AllowEdit;
  473. //e.Cell.Row.Cells["pertainMinSign"].Activation = Activation.AllowEdit;
  474. //e.Cell.Row.Cells["pertainMinVal"].Activation = Activation.AllowEdit;
  475. //e.Cell.Row.Cells["pertainMaxSign"].Activation = Activation.AllowEdit;
  476. //e.Cell.Row.Cells["pertainMaxVal"].Activation = Activation.AllowEdit;
  477. e.Cell.Row.Cells["FactorId"].Activation = Activation.AllowEdit;
  478. }
  479. else
  480. {
  481. e.Cell.Row.Cells["ClassDName"].Activation = Activation.ActivateOnly;
  482. e.Cell.Row.Cells["sortNo"].Activation = Activation.ActivateOnly;
  483. e.Cell.Row.Cells["verType"].Activation = Activation.ActivateOnly;
  484. //e.Cell.Row.Cells["factorVal"].Activation = Activation.ActivateOnly;
  485. //e.Cell.Row.Cells["factorMinSign"].Activation = Activation.ActivateOnly;
  486. //e.Cell.Row.Cells["factorMinVal"].Activation = Activation.ActivateOnly;
  487. //e.Cell.Row.Cells["factorMaxSign"].Activation = Activation.ActivateOnly;
  488. //e.Cell.Row.Cells["factorMaxVal"].Activation = Activation.ActivateOnly;
  489. //e.Cell.Row.Cells["pertainFactorId"].Activation = Activation.ActivateOnly;
  490. //e.Cell.Row.Cells["pertainVal"].Activation = Activation.ActivateOnly;
  491. //e.Cell.Row.Cells["pertainMinSign"].Activation = Activation.ActivateOnly;
  492. //e.Cell.Row.Cells["pertainMinVal"].Activation = Activation.ActivateOnly;
  493. //e.Cell.Row.Cells["pertainMaxSign"].Activation = Activation.ActivateOnly;
  494. //e.Cell.Row.Cells["pertainMaxVal"].Activation = Activation.ActivateOnly;
  495. e.Cell.Row.Cells["FactorId"].Activation = Activation.ActivateOnly;
  496. }
  497. }
  498. }
  499. }
  500. }