Query_ExeProgress.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. using DevComponents.DotNetBar;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Drawing.Drawing2D;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Windows.Forms;
  11. using UAS_MES_NEW.DataOperate;
  12. using UAS_MES_NEW.Entity;
  13. using UAS_MES_NEW.PublicMethod;
  14. namespace UAS_MES_NEW.Query
  15. {
  16. public partial class Query_ExeProgress : Form
  17. {
  18. DataHelper dh;
  19. LogStringBuilder sql = new LogStringBuilder();
  20. //经过的步骤
  21. string PastStep = "";
  22. //经过的步骤
  23. string nextStepCode = "";
  24. //序列号对应抽检批
  25. string checkno = "";
  26. //拆分后的经过的步骤
  27. Dictionary<int, string> Step;
  28. Dictionary<int, string> StepName;
  29. List<Brush> PaintColor = new List<Brush>();
  30. //屏幕高度
  31. int ScreenWidth;
  32. //屏幕宽度
  33. int ScreenHeight;
  34. DataTable dt;
  35. DataTable ms_id;//记录ms_id
  36. DataTable ListA;//记录数据的当前序列号和之前序列号
  37. AutoSizeFormClass asc = new AutoSizeFormClass();
  38. bool Loadad = false;
  39. public Query_ExeProgress()
  40. {
  41. InitializeComponent();
  42. }
  43. private void Query_ExeProgress_Load(object sender, EventArgs e)
  44. {
  45. dh = SystemInf.dh;
  46. ScreenWidth = this.Width;
  47. ScreenHeight = this.Height;
  48. asc.controllInitializeSize(this);
  49. sn_code.Focus();
  50. DoubleBuffered = true;
  51. }
  52. private void Query_ExeProgress_SizeChanged(object sender, EventArgs e)
  53. {
  54. //asc.controlAutoSize(this);
  55. }
  56. private void sn_code_KeyDown(object sender, KeyEventArgs e)
  57. {
  58. if (e.KeyCode == Keys.Enter)
  59. {
  60. string sncode = sn_code.Text;
  61. if (GetUpper.Checked)
  62. {
  63. dt = (DataTable)dh.ExecuteSql("select cm_sncode from craftmaterial where cm_barcode='" + sn_code.Text + "' and nvl(cm_status,0)=0", "select");
  64. if (dt.Rows.Count > 0)
  65. {
  66. sn_code.Text = dt.Rows[0]["cm_sncode"].ToString();
  67. }
  68. }
  69. ms_id = (DataTable)dh.ExecuteSql("select beforesn,sn from makesnrelation where beforesn='" + sn_code.Text + "' or sn='" + sn_code.Text + "'", "select");
  70. if (ms_id.Rows.Count > 0)
  71. {
  72. //说明有过转号
  73. ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_firstsn,ms_checkno from makeserial where ms_sncode='" + ms_id.Rows[0]["beforesn"].ToString() + "' or ms_sncode='" + ms_id.Rows[0]["sn"].ToString() + "' order by ms_id", "select");
  74. }
  75. else
  76. {
  77. //没有过转号
  78. ms_id = (DataTable)dh.ExecuteSql("select ms_id,ms_makecode,ms_firstsn,ms_checkno from makeserial where ms_sncode='" + sn_code.Text + "' order by ms_id", "select");
  79. }
  80. if (ms_id.Rows.Count == 0)
  81. {
  82. //无值则提示
  83. MessageBox.Show("序列号" + sn_code.Text + "不存在");
  84. return;
  85. }
  86. StringBuilder ms_ids = new StringBuilder();//存所有的ms_id
  87. //设置界面工单号
  88. ma_code.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_makecode"].ToString();
  89. ms_checkno.Text = ms_id.Rows[ms_id.Rows.Count - 1]["ms_checkno"].ToString();
  90. int idCount = ms_id.Rows.Count;
  91. for (int i = 0; i < idCount; i++)
  92. {
  93. ms_ids.Append("'" + ms_id.Rows[i]["ms_id"].ToString() + "',");
  94. }
  95. ListA = (DataTable)dh.ExecuteSql("select ms_beforesn,ms_sncode,ms_firstsn,ms_makecode from makeserial where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ")", "select");
  96. dt = (DataTable)dh.ExecuteSql("select ms_status,ms_nextstepcode,ms_paststep,ms_stepcode,ms_checkno,NVL(ms_ifrework, 0) ms_ifrework,NVL(ms_reworkstatus, 0) ms_reworkstatus from makeserial where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ") order by ms_id", "select");
  97. if (dt.Rows.Count > 0)
  98. {
  99. if (Step != null && Step.Count > 0)
  100. {
  101. Step.Clear();
  102. SerialPanel.Controls.Clear();
  103. PaintColor.Clear();
  104. }
  105. string ifRework = dt.Rows[idCount - 1]["ms_ifrework"].ToString();
  106. //执行过的步骤
  107. PastStep = dt.Rows[idCount - 1]["ms_paststep"].ToString();
  108. //下一步骤
  109. nextStepCode = dt.Rows[idCount - 1]["ms_nextstepcode"].ToString();
  110. //序列号所属抽检批
  111. checkno = dt.Rows[idCount - 1]["ms_checkno"].ToString();
  112. //如果为不良的时候
  113. string BadStep = "";
  114. string RejectStep = "";
  115. string currentStep = "";
  116. //先判断是否是返工的
  117. if (ifRework != "0")
  118. {
  119. //是返工的
  120. if (dt.Rows[idCount - 1]["ms_reworkstatus"].ToString() == "3")
  121. {
  122. BadStep = dt.Rows[idCount - 1]["ms_stepcode"].ToString();
  123. }
  124. else if (dt.Rows[idCount - 1]["ms_reworkstatus"].ToString() == "4")
  125. {
  126. RejectStep = dt.Rows[idCount - 1]["ms_stepcode"].ToString();
  127. }
  128. }
  129. else
  130. {
  131. //不是返工的
  132. if (dt.Rows[idCount - 1]["ms_status"].ToString() == "3")
  133. {
  134. BadStep = dt.Rows[idCount - 1]["ms_stepcode"].ToString();
  135. }
  136. else if (dt.Rows[idCount - 1]["ms_status"].ToString() == "4")
  137. {
  138. RejectStep = dt.Rows[idCount - 1]["ms_stepcode"].ToString();
  139. }
  140. }
  141. currentStep = dt.Rows[idCount - 1]["ms_stepcode"].ToString();
  142. bool flag = false;//记录返工单开始就是不良的情况
  143. //如果只有一个单
  144. if (idCount == 1)
  145. {
  146. //添加开始节点绿色,除了返工单
  147. if (BadStep == "" && ((dt.Rows[idCount - 1]["ms_status"].ToString() == "3" && ifRework == "0") || (dt.Rows[idCount - 1]["ms_reworkstatus"].ToString() == "3" && ifRework == "-1")))
  148. {
  149. PaintColor.Add(Brushes.Red);
  150. }
  151. else
  152. {
  153. PaintColor.Add(Brushes.Green);
  154. }
  155. }
  156. else//有至少两个工单,之前的工单肯定是已经完工的
  157. {
  158. PaintColor.Add(Brushes.Green);
  159. if (BadStep == "" && ((dt.Rows[idCount - 1]["ms_status"].ToString() == "3" && ifRework == "0") || (dt.Rows[idCount - 1]["ms_reworkstatus"].ToString() == "3" && ifRework == "-1")))
  160. {
  161. //单独记录返工前oqc判不良
  162. flag = true;
  163. }
  164. }
  165. //查询执行过的步骤
  166. sql.Clear();
  167. sql.Append("select CD_DETNO,CD_STEPCODE,cd_ifoqc,ms_makecode,ms_id,cd_stepname from craft left join craftdetail on cd_crid = cr_id left join makeserial ");
  168. sql.Append("on ms_craftcode=cr_code and ms_prodcode=cr_prodcode where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ") order by ms_id,cd_detno");
  169. dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
  170. Step = new Dictionary<int, string>();
  171. StepName = new Dictionary<int, string>();
  172. for (int i = 0; i < dt.Rows.Count + 2; i++)
  173. {
  174. if (i == 0)
  175. {
  176. Step.Add(i, "开始");
  177. StepName.Add(i, "开始");
  178. }
  179. else if (i == dt.Rows.Count + 1)
  180. {
  181. Step.Add(i, "结束");
  182. StepName.Add(i, "结束");
  183. }
  184. else
  185. {
  186. Step.Add(i, dt.Rows[i - 1]["CD_STEPCODE"].ToString());
  187. StepName.Add(i, dt.Rows[i - 1]["cd_stepname"].ToString());
  188. }
  189. }
  190. //添加中间节点
  191. bool passed = true;
  192. int index = 0;
  193. for (int i = 0; i < dt.Rows.Count; i++)
  194. {
  195. //正在生产的途程才算
  196. if (dt.Rows[i]["ms_id"].ToString() == ms_id.Rows[ms_id.Rows.Count - 1]["ms_id"].ToString())
  197. {
  198. if (nextStepCode == dt.Rows[i]["CD_STEPCODE"].ToString())
  199. {
  200. index = i;
  201. }
  202. }
  203. }
  204. for (int i = 0; i < dt.Rows.Count; i++)
  205. {
  206. //只考虑正在生产的途程,之前工单的途程工序必定为绿色完工
  207. if (dt.Rows[i]["ms_id"].ToString() == ms_id.Rows[ms_id.Rows.Count - 1]["ms_id"].ToString())
  208. {
  209. ////下一步不在途程中,不良或者报废或者完工
  210. if (nextStepCode == "" || nextStepCode == " ")
  211. {
  212. //返工单
  213. if (currentStep == "")
  214. {
  215. passed = false;
  216. }
  217. //找到不良步骤
  218. if (BadStep == dt.Rows[i]["CD_STEPCODE"].ToString())
  219. {
  220. PaintColor.Add(Brushes.Red);
  221. //是不良品,后面就不执行
  222. passed = false;
  223. }
  224. //找到报废步骤
  225. else if (PastStep.Contains(dt.Rows[i]["CD_STEPCODE"].ToString() + "," + RejectStep) && RejectStep != "")
  226. {
  227. PaintColor.Add(Brushes.Black);
  228. //是报废品,后面就不执行
  229. passed = false;
  230. }
  231. else
  232. {
  233. //通过加绿色
  234. if (PastStep.Contains(dt.Rows[i]["CD_STEPCODE"].ToString()))
  235. {
  236. PaintColor.Add(Brushes.Green);
  237. }
  238. //不通过加白色
  239. else
  240. {
  241. PaintColor.Add(Brushes.White);
  242. }
  243. }
  244. }
  245. ////序列号下一步不为空
  246. else
  247. {
  248. /////SN下一步是否在途程中,是则标记
  249. //找到下一步
  250. if (i < index)
  251. {
  252. //已执行
  253. //判断是否为OQC工序
  254. //if (dt.Rows[i]["cd_ifoqc"].ToString() == "-1")
  255. //{
  256. // string oqcpass = dh.getFieldDataByCondition("oqcbatch", "ob_status", "ob_checkno = '" + checkno + "'").ToString();
  257. // if (oqcpass == "OK")
  258. // {
  259. // PaintColor.Add(Brushes.Green);
  260. // }
  261. // else
  262. // {
  263. // PaintColor.Add(Brushes.White);
  264. // }
  265. //}
  266. //else
  267. PaintColor.Add(Brushes.Green);
  268. }
  269. else
  270. {
  271. //未执行
  272. PaintColor.Add(Brushes.White);
  273. }
  274. }
  275. }
  276. else
  277. {
  278. //就是之前生产的途程,为绿色,除了返工
  279. if (flag && (dt.Rows[i + 1]["ms_id"].ToString() == ms_id.Rows[ms_id.Rows.Count - 1]["ms_id"].ToString()))
  280. {
  281. PaintColor.Add(Brushes.Red);
  282. }
  283. else
  284. {
  285. PaintColor.Add(Brushes.Green);
  286. }
  287. }
  288. }
  289. if (ifRework != "0")
  290. {
  291. //完工添加绿色,未完工添加白色
  292. if (dh.CheckExist("Makeserial", "ms_id='" + ms_id.Rows[ms_id.Rows.Count - 1]["ms_id"] + "' and ms_reworkstatus='2'"))
  293. PaintColor.Add(Brushes.Green);
  294. else
  295. PaintColor.Add(Brushes.White);
  296. }
  297. else
  298. {
  299. //完工添加绿色,未完工添加白色
  300. if (dh.CheckExist("Makeserial", "ms_id='" + ms_id.Rows[ms_id.Rows.Count - 1]["ms_id"] + "' and ms_status='2'"))
  301. PaintColor.Add(Brushes.Green);
  302. else
  303. PaintColor.Add(Brushes.White);
  304. }
  305. Refresh();
  306. SerialPanel.Refresh();
  307. StringBuilder mp_sncodes = new StringBuilder();
  308. StringBuilder makecodes = new StringBuilder();
  309. //拼接序列号的和工单号的
  310. for (int i = 0; i < ListA.Rows.Count; i++)
  311. {
  312. //sql mp_sncode
  313. mp_sncodes.Append("'" + ListA.Rows[i]["ms_sncode"].ToString() + "'," + (ListA.Rows[i]["ms_firstsn"].ToString() == "" ? "" : (" '" + ListA.Rows[i]["ms_firstsn"].ToString() + "',")));
  314. //sql ma_code
  315. makecodes.Append("'" + ListA.Rows[i]["ms_makecode"].ToString() + "',");
  316. }
  317. sql.Clear();
  318. sql.Append("select MBR_BRNAME||' '||MBR_SOLUTIONNAME||' '|| MBR_REMARK MBR_BRNAME,MP_RESULT,MP_SNCHECKNO,mp_makecode,ma_prodcode,std_class,sc_linecode,ma_craftcode,mp_sourcecode,mp_sncode,");
  319. sql.Append("MB_BADREMARK mb_badcode,to_char(mp_indate,'yyyy-mm-dd hh24:mi:ss')mp_indate,mp_inman,em_name from makeprocess left join make on mp_makecode=ma_code left join employee on mp_inman = em_code left join source on ");
  320. sql.Append("mp_sourcecode=sc_code left join STEPTESTDETAIL on std_sn=mp_sncode and to_char(mp_indate,'yyyy-mm-dd hh24:mi:ss')=to_char(STD_INDATE,'yyyy-mm-dd hh24:mi:ss')" +
  321. "left join (select max(mb_id)mb_id,wm_concat(distinct mb_badcode||' '||MB_BADNAME)||" +
  322. "' '||wm_concat(distinct MB_BADREMARK) MB_BADREMARK,mb_sncode,to_char(mb_indate,'yyyy-mm-dd hh24:mi:ss')mb_indate from makebad group by mb_sncode,to_char(mb_indate,'yyyy-mm-dd hh24:mi:ss') ) on mb_sncode=mp_sncode and to_char(mp_indate,'yyyy-mm-dd hh24:mi:ss')=mb_indate " +
  323. "left join MAKEBADREASON on mbr_mbid=mb_id where mp_sncode in (" + mp_sncodes.ToString().Substring(0, mp_sncodes.ToString().Length - 1) + ") and ma_code in (" + makecodes.ToString().Substring(0, makecodes.ToString().Length - 1) + ") order by mp_indate");
  324. dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
  325. BaseUtil.FillDgvWithDataTable(CraftInfDgv, dt);
  326. sql.Clear();
  327. sql.Append("select cm_barcode,cm_fsoncode,cm_sncode,cm_indate,cm_inman," +
  328. "case when cm_status=0 then '上线' else '已拆解' end cm_status from craftmaterial where cm_sncode='" + sncode + "'" +
  329. "union " +
  330. "select cm_barcode,cm_fsoncode,cm_sncode,cm_indate,cm_inman," +
  331. "case when cm_status=0 then '上线' else '已拆解' end cm_status from craftmaterial where cm_barcode='" + sncode + "'");
  332. dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
  333. if (dt.Rows.Count > 0)
  334. {
  335. BaseUtil.FillDgvWithDataTable(CraftMaterial, dt);
  336. }
  337. else
  338. {
  339. sql.Clear();
  340. sql.Append("select cm_barcode,cm_fsoncode,cm_sncode,cm_indate,cm_inman," +
  341. "case when cm_status=0 then '上线' else '已拆解' end cm_status from craftmaterial where cm_barcode='" + sn_code.Text + "'");
  342. dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
  343. BaseUtil.FillDgvWithDataTable(CraftMaterial, dt);
  344. }
  345. }
  346. else MessageBox.Show("序列号" + sn_code.Text + "不存在");
  347. }
  348. }
  349. private void SerialPanel_Paint(object sender, PaintEventArgs e)
  350. {
  351. if (Step != null)
  352. {
  353. //设置一行五个展示数量
  354. int RectangleCountEachRow = 5;
  355. int x = 40;
  356. int y = SerialPanel.Height / 10;
  357. int CurrentIndex = 0;
  358. //根据记录的数量判断行数
  359. int RowCount = (Step.Count % RectangleCountEachRow) == 0 ? (Step.Count / RectangleCountEachRow) : (Step.Count / RectangleCountEachRow) + 1;
  360. //每行的循环
  361. for (int i = 1; i <= RowCount; i++)
  362. {
  363. for (int j = CurrentIndex; j < RectangleCountEachRow * i; j++)
  364. {
  365. //创建画板
  366. Graphics g = e.Graphics;
  367. //途程节点的矩形
  368. Rectangle r;
  369. if (Step[j].Contains("开始") || Step[j].Contains("结束"))
  370. {
  371. r = new Rectangle(0, 0, 40, 40);
  372. }
  373. else
  374. r = new Rectangle();
  375. r.Width = SerialPanel.Width / 10;
  376. r.Height = SerialPanel.Height / 8;
  377. //画箭头的Pen
  378. Pen p = new Pen(Color.CadetBlue, 15);
  379. p.StartCap = LineCap.Round;
  380. p.EndCap = LineCap.ArrowAnchor;
  381. //方块内的信息
  382. Label Param = new Label();
  383. Param.Text = j + " " + StepName[j];
  384. Param.Name = j + Step[j] + "_label";
  385. Param.AutoSize = true;
  386. Param.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
  387. Param.Anchor = AnchorStyles.Left;
  388. Param.Anchor = AnchorStyles.Top;
  389. //获取param的宽度和高度
  390. Graphics graphics = Graphics.FromHwnd(Param.Handle);
  391. SizeF size = graphics.MeasureString(Param.Text, Param.Font);
  392. //设定param文本框的位置
  393. //Param.Location = new Point(x + r.Width / 14 * RectangleCountEachRow, y + r.Height / 10 * 4);
  394. Param.Location = new Point(SerialPanel.AutoScrollPosition.X + x + (int)(r.Width - size.Width) / 2, SerialPanel.AutoScrollPosition.Y + y + (int)(r.Height - size.Height) / 2);
  395. graphics.Dispose();
  396. //如果在奇数行
  397. if (i % 2 != 0)
  398. {
  399. r.Location = new Point(SerialPanel.AutoScrollPosition.X + x, SerialPanel.AutoScrollPosition.Y + y);
  400. g.FillRectangle(PaintColor[j], r);
  401. //填充方块内的信息
  402. if (SerialPanel.Controls[Param.Name] == null)
  403. SerialPanel.Controls.Add(Param);
  404. if (j + 1 == Step.Count)
  405. break;
  406. //画箭头
  407. //如果是一行中的箭头
  408. if (j + 1 < RectangleCountEachRow * i)
  409. {
  410. g.DrawLine(p, SerialPanel.AutoScrollPosition.X + x + r.Width + 10, SerialPanel.AutoScrollPosition.Y + y + r.Height / 2, SerialPanel.AutoScrollPosition.X + x + ScreenWidth / (RectangleCountEachRow), SerialPanel.AutoScrollPosition.Y + y + r.Height / 2);
  411. x += ScreenWidth / RectangleCountEachRow;
  412. }
  413. //如果是行的最后一个的箭头
  414. else if (j + 1 == RectangleCountEachRow * i)
  415. {
  416. g.DrawLine(p, SerialPanel.AutoScrollPosition.X + x + r.Width / 2, SerialPanel.AutoScrollPosition.Y + y + r.Height + 10, SerialPanel.AutoScrollPosition.X + x + r.Width / 2, SerialPanel.AutoScrollPosition.Y + y + r.Height + r.Height);
  417. y = y + r.Height + r.Height;
  418. }
  419. }
  420. //如果在偶数行
  421. else
  422. {
  423. r.Location = new Point(SerialPanel.AutoScrollPosition.X + x, SerialPanel.AutoScrollPosition.Y + y);
  424. g.FillRectangle(PaintColor[j], r);
  425. //填充文字信息
  426. //存在这个名称的则不进行添加
  427. if (SerialPanel.Controls[Param.Name] == null)
  428. {
  429. SerialPanel.Controls.Add(Param);
  430. }
  431. //如果最后一个的画则直接Break,不用画箭头了
  432. if (j + 1 == Step.Count)
  433. {
  434. break;
  435. }
  436. //如果不是本行的最后一个画横向的箭头
  437. if (j + 1 < RectangleCountEachRow * i)
  438. {
  439. g.DrawLine(p, SerialPanel.AutoScrollPosition.X + (x - 10), SerialPanel.AutoScrollPosition.Y + (y + r.Height / 2), SerialPanel.AutoScrollPosition.X + (x - ScreenWidth / RectangleCountEachRow + r.Width), SerialPanel.AutoScrollPosition.Y + (y + r.Height / 2));
  440. x -= ScreenWidth / RectangleCountEachRow;
  441. }
  442. //如果是最后一个画纵向的箭头
  443. else if (j + 1 == RectangleCountEachRow * i)
  444. {
  445. g.DrawLine(p, SerialPanel.AutoScrollPosition.X + (x + r.Width / 2), SerialPanel.AutoScrollPosition.Y + (y + r.Height + 10), SerialPanel.AutoScrollPosition.X + (x + r.Width / 2), SerialPanel.AutoScrollPosition.Y + (y + r.Height + r.Height));
  446. y = y + r.Height + r.Height;
  447. }
  448. }
  449. CurrentIndex = CurrentIndex + 1;
  450. }
  451. }
  452. }
  453. }
  454. private void SerialPanel_Scroll(object sender, ScrollEventArgs e)
  455. {
  456. Graphics g = this.SerialPanel.CreateGraphics();
  457. g.Clear(this.BackColor);
  458. SerialPanel.Refresh();
  459. }
  460. private void TestFile_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  461. {
  462. }
  463. private void CraftInfDgv_CellContentClick(object sender, DataGridViewCellEventArgs e)
  464. {
  465. if (e.RowIndex > 0)
  466. {
  467. if (CraftInfDgv.Columns[e.ColumnIndex].Name.ToUpper() == "STD_CLASS")
  468. {
  469. if (CraftInfDgv.Rows[e.RowIndex].Cells["STD_CLASS"].Value != null)
  470. {
  471. System.Diagnostics.Process.Start(CraftInfDgv.Rows[e.RowIndex].Cells["STD_CLASS"].Value.ToString());
  472. }
  473. }
  474. }
  475. }
  476. }
  477. }