FrmBalanceTicketsAline.cs 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. namespace Core.StlMes.Client.Sale.UI.Balance.BalanceAccount
  10. {
  11. public partial class FrmBalanceTicketsAline : Core.StlMes.Client.Sale.Common.FrmStyleBase.FrmUIBase
  12. {
  13. public FrmBalanceTicketsAline()
  14. {
  15. InitializeComponent();
  16. }
  17. DataSet dsMain = new DataSet();
  18. DataSet dsGrid2 = new DataSet();
  19. DataSet dsGrid3 = new DataSet();
  20. private Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.Balance.SlmBalanceInfo slmBalanceInfo = null;
  21. private Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.StaticData.PublicStaticVariable publicStaticVariable = null;
  22. private Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.Trans.YdmZcLoadVehicleMatMgt ydmZcLoadVehicleMatMgt
  23. = null;
  24. private void InitOb()
  25. {
  26. ydmZcLoadVehicleMatMgt = new Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.Trans.YdmZcLoadVehicleMatMgt(this.ob);
  27. slmBalanceInfo = new Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.Balance.SlmBalanceInfo(this.ob);
  28. }
  29. private void InitDataSource()
  30. {
  31. dsMain = base.GetDataSetByColumnName(GetDataStructMain(), GetTbColumnNameAndDataType(),
  32. base.ConvertListStringArrayToHashTable(GetDataStructCaption()));
  33. this.ultraGrid1.DataSource = dsMain;
  34. dsGrid2 = base.GetDataSetByColumnName(this.GetGrid2DataStruct(), null, base.ConvertListStringArrayToHashTable(GetDataStructCaption()));
  35. this.ultraGrid2.DataSource = dsGrid2;
  36. dsGrid3 = base.GetDataSetByColumnName(this.GetGrid3DataStruct(), GetTbColumnNameAndDataType(), base.ConvertListStringArrayToHashTable(GetDataStructCaption()));
  37. this.ultraGrid3.DataSource = dsGrid3;
  38. }
  39. private void HiddenColumn()
  40. {
  41. try
  42. {
  43. this.ultraGrid1.DisplayLayout.Bands[0].Columns[this.CUSTOMER_NO].Hidden = true;
  44. this.ultraGrid1.DisplayLayout.Bands[0].Columns[this.CARRY_COMPANY_CODE].Hidden = true;
  45. this.ultraGrid1.DisplayLayout.Bands[0].Columns[this.RECEIV_NO].Hidden = true;
  46. this.ultraGrid1.DisplayLayout.Bands[0].Columns["SUPPLY_UNIT"].Hidden = true;
  47. this.ultraGrid1.DisplayLayout.Bands[0].Columns[this.BILL_STATUS].Hidden = true;
  48. this.ultraGrid1.DisplayLayout.Bands[0].Columns[this.CARRY_COMPANY_NAME].Hidden = true;
  49. // this.ultraGrid1.DisplayLayout.Bands[0].Columns[this.LOADVEHICLE_TYPE].Hidden = true;
  50. // this.ultraGrid1.DisplayLayout.Bands[0].Columns[this.TRANSMNY_TICKET_STATUS].Hidden = true;
  51. this.ultraGrid2.DisplayLayout.Bands[0].Columns[this.ORD_PK].Hidden = true;
  52. this.ultraGrid2.DisplayLayout.Bands[0].Columns[this.ORD_LN_PK].Hidden = true;
  53. this.ultraGrid2.DisplayLayout.Bands[0].Columns[this.ORD_LN_DLY_PK].Hidden = true;
  54. this.ultraGrid3.DisplayLayout.Bands[0].Columns[this.ORD_PK].Hidden = true;
  55. this.ultraGrid3.DisplayLayout.Bands[0].Columns[this.ORD_LN_PK].Hidden = true;
  56. this.ultraGrid3.DisplayLayout.Bands[0].Columns[this.ORD_LN_DLY_PK].Hidden = true;
  57. }
  58. catch
  59. { }
  60. }
  61. private void InitGridValeList()
  62. {
  63. try
  64. {
  65. this.ultraGrid1.DisplayLayout.Bands[0].Columns[this.LOADVEHICLE_TYPE]
  66. .ValueList = GetLoadTypeStatusList();
  67. }
  68. catch
  69. {
  70. }
  71. try
  72. {
  73. this.ultraGrid2.DisplayLayout.Bands[0].Columns["AGENCY_FL"]
  74. .ValueList = GetAgnflStatusList();
  75. }
  76. catch
  77. {
  78. }
  79. try
  80. {
  81. this.ultraGrid2.DisplayLayout.Bands[0].Columns["TRANS_TPE"]
  82. .ValueList = GetTransTpe();
  83. }
  84. catch
  85. {
  86. }
  87. try
  88. {
  89. this.ultraGrid3.DisplayLayout.Bands[0].Columns["TRANSIT_TYP"]
  90. .ValueList = GetTransTpe();
  91. }
  92. catch
  93. {
  94. }
  95. try
  96. {
  97. this.ultraGrid3.DisplayLayout.Bands[0].Columns["AGENCY_FL"]
  98. .ValueList = GetTransStatusList();
  99. }
  100. catch
  101. {
  102. }
  103. }
  104. protected override System.Collections.Hashtable GetTbColumnNameAndDataType()
  105. {
  106. System.Collections.Hashtable hs = new System.Collections.Hashtable();
  107. hs.Add( "BILL_CK","System.Boolean");
  108. hs.Add( "OUTSTOCK_CK","System.Boolean");
  109. hs.Add( "TRANSMNY_CK","System.Boolean");
  110. hs.Add(this.SELECT, "System.Boolean");
  111. return hs;
  112. }
  113. private Infragistics.Win.ValueList GetLoadTypeStatusList()
  114. {
  115. Infragistics.Win.ValueList lit = new Infragistics.Win.ValueList();
  116. lit.ValueListItems.Add("1", "实单");
  117. lit.ValueListItems.Add("2", "虚单");
  118. return lit;
  119. }
  120. private Infragistics.Win.ValueList GetAgnflStatusList()
  121. {
  122. Infragistics.Win.ValueList lit = new Infragistics.Win.ValueList();
  123. lit.ValueListItems.Add("0", "不代办");
  124. lit.ValueListItems.Add("1", "代办");
  125. return lit;
  126. }
  127. private Infragistics.Win.ValueList GetTransStatusList()
  128. {
  129. Infragistics.Win.ValueList lit = new Infragistics.Win.ValueList();
  130. lit.ValueListItems.Add("0", "无客户代办");
  131. lit.ValueListItems.Add("1", "TPCO代办");
  132. lit.ValueListItems.Add("2", "客户代办");
  133. return lit;
  134. }
  135. private Infragistics.Win.ValueList GetTransTpe()
  136. {
  137. Infragistics.Win.ValueList lit = new Infragistics.Win.ValueList();
  138. lit.ValueListItems.Add("110501", "汽运");
  139. lit.ValueListItems.Add("110502", "铁运");
  140. lit.ValueListItems.Add("110503", "船运");
  141. return lit;
  142. }
  143. private void InitCellAllowEdit()
  144. {
  145. foreach (string s in new string[] { this.BILL_CK,this.OUTSTOCK_CK,this.TRANSMNY_CK})
  146. {
  147. this.ultraGrid1.DisplayLayout.Bands[0].Columns[s].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  148. this.ultraGrid1.DisplayLayout.Bands[0].Columns[s].CellAppearance.BackColor = base.GetEditColor();
  149. }
  150. foreach (string s in new string[] { this.SELECT, this.TRANSMNY, "STAMP_DUTY_MONEY", "DISBURASES_BILL", "TRANS_NO" })
  151. {
  152. this.ultraGrid3.DisplayLayout.Bands[0].Columns[s].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
  153. this.ultraGrid3.DisplayLayout.Bands[0].Columns[s].CellAppearance.BackColor = base.GetEditColor();
  154. }
  155. }
  156. private void FrmBalanceTicketsAline_Load(object sender, EventArgs e)
  157. {
  158. this.dateTimePicker1.Value = System.DateTime.Now.AddMonths(-1);
  159. this.dateTimePicker3.Value = System.DateTime.Now.AddMonths(-1);
  160. dateTimePicker3.Enabled = false;
  161. dateTimePicker4.Enabled = false;
  162. this.radioButton1.Checked = true;
  163. InitOb();
  164. InitDataSource();
  165. HiddenColumn();
  166. InitGridValeList();
  167. base.SetGridStyle(ref this.ultraGrid1,ref this.ultraGrid2,ref this.ultraGrid3);
  168. InitCellAllowEdit();
  169. this.ultraGrid2.DisplayLayout.Bands[0].Columns["OUTSTOCKMNY"].MaskInput = "-nn,nnn,nnn.nnnnn";
  170. }
  171. protected override System.Collections.Hashtable GetGridColumnLength()
  172. {
  173. System.Collections.Hashtable hs = new System.Collections.Hashtable();
  174. hs.Add(this.LOADVEHICLE_TYPE, 60);
  175. hs.Add(this.BILL_TICKET_STATUS, 60);
  176. hs.Add(this.OUTSTOCK_TICKET_STATUS, 60);
  177. hs.Add(this.TRANSMNY_TICKET_STATUS, 60);
  178. hs.Add(this.ACT_COUNT, 60);
  179. hs.Add(this.ACT_WEIGHT, 60);
  180. hs.Add(SEND_NUM, 60);
  181. hs.Add(this.BILL_CK, 40);
  182. hs.Add(this.OUTSTOCK_CK, 60);
  183. hs.Add(this.TRANSMNY_CK, 40);
  184. hs.Add(this.CREATE_TIME, 100);
  185. hs.Add("ORDERNO", 110);
  186. hs.Add("JUDGE_STOVE_NO", 60);
  187. hs.Add("BATCH_NO", 50);
  188. hs.Add("QUANTITY", 50);
  189. hs.Add("WEIGHT", 90);
  190. hs.Add(this.SELECT, 50);
  191. hs.Add(this.TRANSMNY, 70);
  192. return hs;
  193. }
  194. private string _activeBillNo = "";
  195. public override void Query()
  196. {
  197. this._activeBillNo = "";
  198. Query01();
  199. }
  200. public void Query01()
  201. {
  202. DataSet ds = null;
  203. DateTime date3 = new DateTime();
  204. DateTime date4 = new DateTime();
  205. if (uchkDate.Checked)
  206. {
  207. date3=dateTimePicker3.Value;
  208. date4=dateTimePicker4.Value;
  209. }
  210. if (this.textBox7.Text.Trim().Length > 0)
  211. {
  212. if (this.radioButton1.Checked) // 未对齐
  213. ds = ydmZcLoadVehicleMatMgt.GetBillNoAfterCloseByBillno(this.textBox7.Text.Trim());
  214. else if (this.radioButton2.Checked) // 已对齐
  215. ds = ydmZcLoadVehicleMatMgt.GetAlineBillNoAfterCloseByBillno(this.textBox7.Text.Trim());
  216. else if (this.radioButton3.Checked) // 已发送
  217. ds = ydmZcLoadVehicleMatMgt.GetSendSuccessBillNoAfterCloseByBillno(this.textBox7.Text.Trim());
  218. }
  219. else
  220. {
  221. if (this.radioButton1.Checked) // 未对齐
  222. ds = ydmZcLoadVehicleMatMgt.GetBillNoAfterCloseByBillCreateTime(this.dateTimePicker1.Value,
  223. this.dateTimePicker2.Value,date3,date4);
  224. else if (this.radioButton2.Checked) // 已对齐
  225. ds = ydmZcLoadVehicleMatMgt.GetAlineBillNoAfterCloseByBillCreateTime(this.dateTimePicker1.Value,
  226. this.dateTimePicker2.Value,date3,date4);
  227. else if (this.radioButton3.Checked) // 已发送
  228. ds = ydmZcLoadVehicleMatMgt.GetSendSuccessBillNoAfterCloseByBillCreateTime(this.dateTimePicker1.Value,
  229. this.dateTimePicker2.Value,date3,date4);
  230. }
  231. if (!this.UserInfo.GetUserName().Equals("admin"))
  232. ds = base.GetDataSetByFilterDeptId(ds);
  233. ds = Util.UtilDataSet.GetDataSetWithRowFilter(ds, "SUPPLY_UNIT", this.CustomInfo);
  234. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref this.dsMain, ds);
  235. try
  236. {
  237. if (this.radioButton1.Checked)
  238. {
  239. foreach (DataRow dr in dsMain.Tables[0].Rows)
  240. {
  241. dr[this.BILL_CK] = (dr[this.BILL_TICKET_STATUS].ToString() == "N") ? true : false;
  242. dr[this.OUTSTOCK_CK] = (dr[this.OUTSTOCK_TICKET_STATUS].ToString() == "N"
  243. || dr[this.OUTSTOCK_TICKET_STATUS].ToString() == "OK"
  244. ) ? true : false;
  245. dr[this.TRANSMNY_CK] = (dr[this.TRANSMNY_TICKET_STATUS].ToString() == "N"
  246. || dr[this.TRANSMNY_TICKET_STATUS].ToString() == "OK"
  247. ) ? true : false;
  248. }
  249. }
  250. if (this.radioButton2.Checked || this.radioButton3.Checked)
  251. {
  252. foreach (DataRow dr in dsMain.Tables[0].Rows)
  253. {
  254. dr[this.BILL_CK] = true;
  255. dr[this.OUTSTOCK_CK] = true;
  256. dr[this.TRANSMNY_CK] = true;
  257. }
  258. }
  259. }
  260. catch
  261. { }
  262. if (_activeBillNo.Length == 0)
  263. return;
  264. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugrs in this.ultraGrid1.Rows)
  265. {
  266. if (_activeBillNo == ugrs.Cells[this.BILL_NO].Value.ToString())
  267. {
  268. ugrs.Activated = true;
  269. break;
  270. }
  271. }
  272. }
  273. private void QueryGrid2()
  274. {
  275. dsGrid2.Clear();
  276. try
  277. {
  278. Infragistics.Win.UltraWinGrid.UltraGridRow ugr = null;
  279. if (this.ultraGrid1.Rows.Count == 0)
  280. return;
  281. if (this.ultraGrid1.Rows.Count == 1)
  282. ugr = this.ultraGrid1.Rows[0];
  283. else
  284. ugr = this.ultraGrid1.ActiveRow;
  285. if (ugr == null)
  286. return;
  287. string loadvtype = ugr.Cells[this.LOADVEHICLE_TYPE].Value.ToString();
  288. string bill_sts = ugr.Cells[this.BILL_STATUS].Value.ToString();
  289. DataSet ds = null;
  290. if (loadvtype == "1" || bill_sts == "4" || bill_sts == "5" || bill_sts == "6")
  291. {
  292. ds = this.ydmZcLoadVehicleMatMgt.GetAlineBillMateByBillNo(ugr.Cells[this.BILL_NO].Value.ToString());
  293. }
  294. else
  295. {
  296. ds = this.ydmZcLoadVehicleMatMgt.GetAlineVirtualBillMateByBillNo(ugr.Cells[this.BILL_NO].Value.ToString());
  297. }
  298. Core.StlMes.Client.Sale.Util.UtilDataSet
  299. .SetDataSetByMergeSameColumnName(ref this.dsGrid2, ds);
  300. }
  301. catch
  302. {
  303. }
  304. }
  305. private void QueryGrid3()
  306. {
  307. this.dsGrid3.Clear();
  308. try
  309. {
  310. Infragistics.Win.UltraWinGrid.UltraGridRow ugr = null;
  311. if (this.ultraGrid1.Rows.Count == 0)
  312. return;
  313. if (this.ultraGrid1.Rows.Count == 1)
  314. ugr = this.ultraGrid1.Rows[0];
  315. else
  316. ugr = this.ultraGrid1.ActiveRow;
  317. if (ugr == null)
  318. return;
  319. DataSet ds = this.ydmZcLoadVehicleMatMgt.GetAlineTransDeliveryByBillNo(ugr.Cells[this.BILL_NO].Value.ToString());
  320. if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
  321. return;
  322. DataRow[] dr0 = ds.Tables[0].Select(" AGENCY_FL = '0' ");
  323. DataRow[] dr1 = ds.Tables[0].Select(" AGENCY_FL = '1' ");
  324. DataRow[] dr2 = ds.Tables[0].Select(" AGENCY_FL = '2' ");
  325. DataSet dsClone = ds.Clone();
  326. if (dr0 != null && dr0.Length > 0)
  327. {
  328. dsClone.Tables[0].Rows.Add(dr0[0].ItemArray);
  329. }
  330. if (dr1 != null && dr1.Length > 0)
  331. {
  332. dsClone.Tables[0].Rows.Add(dr1[0].ItemArray);
  333. }
  334. if (dr2 != null && dr2.Length > 0)
  335. {
  336. dsClone.Tables[0].Rows.Add(dr2[0].ItemArray);
  337. }
  338. Core.StlMes.Client.Sale.Util.UtilDataSet
  339. .SetDataSetByMergeSameColumnName(ref this.dsGrid3, dsClone);
  340. SetDataSetGrid3();
  341. SetGrid3TicketNumAndMoney(ugr.Cells[this.BILL_NO].Value.ToString());
  342. }
  343. catch
  344. {
  345. }
  346. }
  347. private void SetGrid3TicketNumAndMoney(string billno)
  348. {
  349. if (this.dsGrid3 == null || this.dsGrid3.Tables.Count == 0 || this.dsGrid3.Tables[0].Rows.Count == 0)
  350. return;
  351. DataSet ds = this.slmBalanceInfo.GetSlmBalanceTransMoneyAskPlanid(billno);
  352. ds = Util.UtilDataSet.GetDataSetWithRowFilter(ds, "MONEY_TYPE", "运费");
  353. if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
  354. return;
  355. double ticketnum = 0;
  356. double money = 0;
  357. double stampDutyMoney = 0;
  358. string _disburasesbill = "";
  359. string _no = "";
  360. foreach (DataRow dr in this.dsGrid3.Tables[0].Rows)
  361. {
  362. ticketnum = 0;
  363. money = 0;
  364. stampDutyMoney = 0;
  365. string rowfilter = string.Format(@" ASKPLAN_ID = '{0}' and AGENCY_FL = '{1}' ",
  366. billno
  367. , dr["AGENCY_FL"].ToString());
  368. DataRow[] drs = ds.Tables[0].Select(rowfilter);
  369. if (drs == null || drs.Length == 0)
  370. continue;
  371. foreach (DataRow drm in drs)
  372. {
  373. money = money + Util.ConverObject.ConvertToDouble(drm["MONEY"]);
  374. stampDutyMoney = stampDutyMoney + Util.ConverObject.ConvertToDouble(drm["STAMP_DUTY_MONEY"]);
  375. if (_disburasesbill.Equals(""))
  376. _disburasesbill = drm["DISBURASES_BILL"].ToString();
  377. else
  378. _disburasesbill = _disburasesbill + ";" + drm["DISBURASES_BILL"].ToString();
  379. if (_no.Equals(""))
  380. _no = drm["TRANS_NO"].ToString();
  381. else
  382. _no = _no + ";" + drm["TRANS_NO"].ToString();
  383. }
  384. dr["TRANSMNY"] = money;
  385. dr["STAMP_DUTY_MONEY"] = stampDutyMoney;
  386. dr["DISBURASES_BILL"] = _disburasesbill;
  387. dr["TRANS_NO"] = _no;
  388. }
  389. }
  390. //SELECT,
  391. // TRANSMNY,
  392. // "TICKETTYPE",
  393. private void SetDataSetGrid3()
  394. {
  395. try
  396. {
  397. foreach (DataRow dr in dsGrid3.Tables[0].Rows)
  398. {
  399. dr["TICKETTYPE"] = GetTicketType(dr["AGENCY_FL"].ToString(),
  400. "", ""
  401. );
  402. dr[this.SELECT] = false;
  403. }
  404. }
  405. catch
  406. {
  407. }
  408. }
  409. private string GetTicketType(string agfl,string indexno,string recdliv)
  410. {
  411. return (agfl == "0") ? "报销" : (agfl == "1") ? "应收" : "冲减应收";
  412. if (recdliv == "TPCO库房" && agfl == "1")
  413. return "应收";
  414. if (recdliv == "TPCO库房" && agfl == "0")
  415. return "无";
  416. if (recdliv == "TPCO库房车板" && agfl == "1")
  417. return "报销";
  418. if (recdliv == "指定地点" && agfl == "1" && indexno == "1")
  419. return "报销";
  420. if (recdliv == "指定地点" && agfl == "0" && indexno == "1")
  421. return "冲减应收";
  422. if (recdliv == "指定地点" && agfl == "1" && indexno != "1")
  423. return "应收";
  424. if (recdliv == "指定地点" && agfl == "0" && indexno != "1")
  425. return "无";
  426. return "无";
  427. }
  428. // 确认对齐
  429. public override void Affrim()
  430. {
  431. if (this.ultraGrid1.Rows.Count == 0)
  432. return;
  433. if (this.ultraGrid1.Rows.Count == 1)
  434. this.ultraGrid1.Rows[0].Activated = true;
  435. Infragistics.Win.UltraWinGrid.UltraGridRow ugre = null;
  436. ugre = this.ultraGrid1.ActiveRow;
  437. if (ugre == null)
  438. {
  439. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("请选择需要确认的行");
  440. return;
  441. }
  442. ugre.Selected = true;
  443. this.ultraGrid1.UpdateData();
  444. this.ultraGrid3.UpdateData();
  445. System.Collections.ArrayList list = new System.Collections.ArrayList();
  446. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in this.ultraGrid1.Selected.Rows)
  447. {
  448. string[] temp = null;
  449. string billck = "0";
  450. string outck = "0";
  451. string transck = "0";
  452. string billno = ugr.Cells[this.BILL_NO].Value.ToString();
  453. billck = (ugr.Cells[this.BILL_CK].Value.ToString().ToUpper() == "TRUE") ? "1" : "0";
  454. outck = (ugr.Cells[this.OUTSTOCK_CK].Value.ToString().ToUpper() == "TRUE") ? "1" : "0";
  455. transck = (ugr.Cells[this.TRANSMNY_CK].Value.ToString().ToUpper() == "TRUE") ? "1" : "0";
  456. if (outck == "1")
  457. {
  458. if (ugr.Cells[this.LOADVEHICLE_TYPE].Value.ToString() == "2" &&
  459. (ugr.Cells[this.BILL_STATUS].Value.ToString() == "0"
  460. || ugr.Cells[this.BILL_STATUS].Value.ToString() == "1"
  461. || ugr.Cells[this.BILL_STATUS].Value.ToString() == "2"
  462. || ugr.Cells[this.BILL_STATUS].Value.ToString() == "3"))
  463. {
  464. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("虚单且未进行二次关闭,不允许确认出库费");
  465. return;
  466. }
  467. }
  468. if (transck == "1" && ugr.Cells[this.TRANSMNY_TICKET_STATUS].Value.ToString() == "N")
  469. {
  470. int index = 0;
  471. // 先检查有没有输入运费
  472. if (this.ultraGrid3.Rows.Count > 0)
  473. {
  474. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugrs in this.ultraGrid3.Rows)
  475. {
  476. if (ugrs.Cells["TICKETTYPE"].Value.ToString() == "无")
  477. continue;
  478. string transmoney = ugrs.Cells[TRANSMNY].Value.ToString();
  479. if (transmoney.Length == 0)
  480. {
  481. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("无运费维护,不能确认运费");
  482. return;
  483. }
  484. //if (Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble(transmoney) == 0)
  485. //{
  486. // Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("无运费维护,不能确认运费");
  487. // return;
  488. //}
  489. index++;
  490. }
  491. // 防止界面输入数值,但是没有保存,从后台查询数据校验
  492. DataSet dstransmny = this.slmBalanceInfo.GetSlmBalanceTransMoneyAskPlanid(billno);
  493. dstransmny = Util.UtilDataSet.GetDataSetWithRowFilter(dstransmny, "MONEY_TYPE", "运费");
  494. try
  495. {
  496. if (index > dstransmny.Tables[0].Rows.Count)
  497. {
  498. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("无运费维护,不能确认运费");
  499. return;
  500. }
  501. }
  502. catch
  503. {
  504. }
  505. }
  506. }
  507. temp = new string[] { ugr.Cells[this.BILL_NO].Value.ToString(),
  508. billck,outck,transck
  509. };
  510. list.Add(temp);
  511. }
  512. if (list.Count == 0)
  513. return;
  514. string errMsg = "";
  515. this.ydmZcLoadVehicleMatMgt.AffrimAline(list, CoreFS.SA06.CoreUserInfo.UserInfo
  516. .GetUserName(), out errMsg);
  517. if (errMsg.Length > 0)
  518. {
  519. }
  520. else
  521. {
  522. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("操作成功");
  523. }
  524. this.Query01();
  525. }
  526. // 取消对齐
  527. public override void UnAffrim()
  528. {
  529. if (this.ultraGrid1.Rows.Count == 0)
  530. return;
  531. if (this.ultraGrid1.Rows.Count == 1)
  532. this.ultraGrid1.Rows[0].Activated = true;
  533. Infragistics.Win.UltraWinGrid.UltraGridRow ugr = null;
  534. ugr = this.ultraGrid1.ActiveRow;
  535. if (ugr == null)
  536. {
  537. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("请选择需要取消确认的行");
  538. return;
  539. }
  540. this.ultraGrid1.UpdateData();
  541. System.Collections.ArrayList list = new System.Collections.ArrayList();
  542. string[] temp = null;
  543. string billck = "0";
  544. string outck = "0";
  545. string transck = "0";
  546. billck = (ugr.Cells[this.BILL_CK].Value.ToString().ToUpper() == "TRUE") ? "1" : "0";
  547. outck = (ugr.Cells[this.OUTSTOCK_CK].Value.ToString().ToUpper() == "TRUE") ? "1" : "0";
  548. transck = (ugr.Cells[this.TRANSMNY_CK].Value.ToString().ToUpper() == "TRUE") ? "1" : "0";
  549. temp = new string[] { ugr.Cells[this.BILL_NO].Value.ToString(),
  550. billck,outck,transck
  551. };
  552. list.Add(temp);
  553. if (list.Count == 0)
  554. return;
  555. string errMsg = "";
  556. this.ydmZcLoadVehicleMatMgt.UnAffrimAline(list, CoreFS.SA06.CoreUserInfo.UserInfo
  557. .GetUserName(), out errMsg);
  558. if (errMsg.Length > 0)
  559. {
  560. }
  561. else
  562. {
  563. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("操作成功");
  564. }
  565. this.Query01();
  566. }
  567. public override void Export()
  568. {
  569. Core.StlMes.Client.Sale.Util.UtilUltraGrid.ExportGridDataToExcel(this.Text, this.ultraGrid1);
  570. }
  571. // 保存运费
  572. public override void Add()
  573. {
  574. if (this.ultraGrid3.Rows.Count == 0)
  575. return;
  576. Infragistics.Win.UltraWinGrid.UltraGridRow ugs = this.ultraGrid1.ActiveRow;
  577. if(ugs == null ) return;
  578. if(ugs.Cells["TRANSMNY_TICKET_STATUS"].Value.ToString() == "已对齐" || ugs.Cells["TRANSMNY_TICKET_STATUS"].Value.ToString() == "发送结算")
  579. {
  580. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("运费已经确认或结算接收,不允许保存");
  581. return;
  582. }
  583. this.ultraGrid3.UpdateData();
  584. string errMsg = "";
  585. string err = "";
  586. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in this.ultraGrid3.Rows)
  587. {
  588. if (ugr.Cells[this.SELECT].Value.ToString().ToUpper() == "TRUE")
  589. {
  590. if (ugr.Cells["TICKETTYPE"].Value.ToString() == "无")
  591. continue;
  592. string billno = this.ultraGrid1.ActiveRow.Cells[this.BILL_NO].Value.ToString();
  593. string transmoney = ugr.Cells[TRANSMNY].Value.ToString();
  594. string stampDutyMoney = ugr.Cells["STAMP_DUTY_MONEY"].Value.ToString();
  595. string tickettype = ugr.Cells["TICKETTYPE"].Value.ToString();
  596. string agencyfl = ugr.Cells["AGENCY_FL"].Value.ToString();
  597. string disburasesbill = ugr.Cells["DISBURASES_BILL"].Value.ToString();
  598. string transNo = ugr.Cells["TRANS_NO"].Value.ToString();
  599. string delvaddr = "";
  600. // string delvaddr = ugr.Cells["DELVRY_ADDR"].Value.ToString();
  601. //string ordpk = ugr.Cells["ORD_PK"].Value.ToString();
  602. //string ordLnPk = ugr.Cells["ORD_LN_PK"].Value.ToString();
  603. //string ordLndPk = ugr.Cells["ORD_LN_DLY_PK"].Value.ToString();
  604. //string indexNo = ugr.Cells["INDEX_SEQ"].Value.ToString();
  605. string ordpk = "";
  606. string ordLnPk = "";
  607. string ordLndPk = "";
  608. string indexNo = "";
  609. this.slmBalanceInfo.SaveTransMoneyWithAlineTicket(billno,
  610. transmoney,tickettype,agencyfl,delvaddr,ordpk,ordLnPk,ordLndPk,indexNo,
  611. CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName(), "0", disburasesbill, transNo, stampDutyMoney, out errMsg);
  612. if (errMsg.Length > 0)
  613. {
  614. return;
  615. }
  616. }
  617. }
  618. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("操作成功");
  619. QueryGrid3();
  620. }
  621. // 发送结算
  622. public override void Send1()
  623. {
  624. if (this.ultraGrid1.Rows.Count == 0)
  625. return;
  626. if (this.ultraGrid1.Rows.Count == 1)
  627. this.ultraGrid1.Rows[0].Activated = true;
  628. Infragistics.Win.UltraWinGrid.UltraGridRow ugr1 = null;
  629. ugr1 = this.ultraGrid1.ActiveRow;
  630. if (ugr1 == null)
  631. {
  632. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("请选择需要发送的行");
  633. return;
  634. }
  635. string errMsg = "";
  636. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in this.ultraGrid1.Selected.Rows)
  637. {
  638. string billck = (ugr.Cells[this.BILL_TICKET_STATUS].Value.ToString() == "已对齐") ? "1" : "0";
  639. string outck = (ugr.Cells[this.OUTSTOCK_TICKET_STATUS].Value.ToString() == "已对齐"
  640. || ugr.Cells[this.OUTSTOCK_TICKET_STATUS].Value.ToString() == "OK"
  641. ) ? "1" : "0";
  642. string transck = (ugr.Cells[this.TRANSMNY_TICKET_STATUS].Value.ToString() == "已对齐"
  643. || ugr.Cells[this.TRANSMNY_TICKET_STATUS].Value.ToString() == "OK"
  644. ) ? "1" : "0";
  645. this.ydmZcLoadVehicleMatMgt.AcceptTicketBySendTicketToInvoice(ugr.Cells[this.BILL_NO].Value.ToString(),
  646. GetoutStockMny(ugr.Cells[this.BILL_NO].Value.ToString()), ugr.Cells[this.LOADVEHICLE_TYPE].Value.ToString(), billck, outck, transck,
  647. CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName(),
  648. out errMsg
  649. );
  650. if (errMsg.Length > 0)
  651. {
  652. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(ugr.Cells[this.BILL_NO].Value.ToString() + "发送失败!" + errMsg);
  653. return;
  654. }
  655. }
  656. if (errMsg.Length == 0)
  657. {
  658. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("发送成功");
  659. }
  660. this.Query01();
  661. }
  662. public override void Send()
  663. {
  664. if (this.ultraGrid1.Rows.Count == 0)
  665. return;
  666. if (this.ultraGrid1.Rows.Count == 1)
  667. this.ultraGrid1.Rows[0].Activated = true;
  668. Infragistics.Win.UltraWinGrid.UltraGridRow ugr = null;
  669. ugr = this.ultraGrid1.ActiveRow;
  670. if (ugr == null)
  671. {
  672. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("请选择需要发送的行");
  673. return;
  674. }
  675. string errMsg = "";
  676. string billck = (ugr.Cells[this.BILL_TICKET_STATUS].Value.ToString() == "已对齐") ? "1" : "0";
  677. string outck = (ugr.Cells[this.OUTSTOCK_TICKET_STATUS].Value.ToString() == "已对齐"
  678. || ugr.Cells[this.OUTSTOCK_TICKET_STATUS].Value.ToString() == "OK"
  679. ) ? "1" : "0";
  680. string transck = (ugr.Cells[this.TRANSMNY_TICKET_STATUS].Value.ToString() == "已对齐"
  681. || ugr.Cells[this.TRANSMNY_TICKET_STATUS].Value.ToString() == "OK"
  682. ) ? "1" : "0";
  683. this.ydmZcLoadVehicleMatMgt.AcceptTicketBySendTicketToInvoice(ugr.Cells[this.BILL_NO].Value.ToString(),
  684. GetoutStockMny(ugr.Cells[this.BILL_NO].Value.ToString()), ugr.Cells[this.LOADVEHICLE_TYPE].Value.ToString(), billck, outck, transck,
  685. CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName(),
  686. out errMsg
  687. );
  688. if (errMsg.Length == 0)
  689. {
  690. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("发送成功");
  691. }
  692. this.Query01();
  693. }
  694. public override void UnSend()
  695. {
  696. if (this.ultraGrid1.Rows.Count == 0)
  697. return;
  698. if (this.ultraGrid1.Rows.Count == 1)
  699. this.ultraGrid1.Rows[0].Activated = true;
  700. Infragistics.Win.UltraWinGrid.UltraGridRow ugr = null;
  701. ugr = this.ultraGrid1.ActiveRow;
  702. if (ugr == null)
  703. {
  704. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("请选择需要发送的行");
  705. return;
  706. }
  707. this.ultraGrid1.UpdateData();
  708. string errMsg = "";
  709. string billck = "0";
  710. string outck = "0";
  711. string transck = "0";
  712. if (ugr.Cells[this.BILL_CK].Value.ToString().ToUpper() == "TRUE" &&
  713. ugr.Cells[this.BILL_TICKET_STATUS].Value.ToString() == "发送结算")
  714. {
  715. billck = "1";
  716. }
  717. if (ugr.Cells[this.OUTSTOCK_CK].Value.ToString().ToUpper() == "TRUE" &&
  718. ( ugr.Cells[this.OUTSTOCK_TICKET_STATUS].Value.ToString() == "发送结算"
  719. || ugr.Cells[this.OUTSTOCK_TICKET_STATUS].Value.ToString() == "OK")
  720. )
  721. {
  722. outck = "1";
  723. }
  724. if (ugr.Cells[this.TRANSMNY_CK].Value.ToString().ToUpper() == "TRUE" &&
  725. (ugr.Cells[this.TRANSMNY_TICKET_STATUS].Value.ToString() == "发送结算"
  726. || ugr.Cells[this.TRANSMNY_TICKET_STATUS].Value.ToString() == "OK")
  727. )
  728. {
  729. transck = "1";
  730. }
  731. this.ydmZcLoadVehicleMatMgt.RollBackTicketBySendTicketToInvoice(ugr.Cells[this.BILL_NO].Value.ToString(),
  732. ugr.Cells[this.LOADVEHICLE_TYPE].Value.ToString(), billck, outck, transck,
  733. CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName(), out errMsg
  734. );
  735. if (errMsg.Length == 0)
  736. {
  737. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("取消发送成功");
  738. }
  739. this.Query01();
  740. }
  741. private System.Collections.ArrayList GetoutStockMny(string billno)
  742. {
  743. System.Collections.ArrayList list = new System.Collections.ArrayList();
  744. if (this.ultraGrid2.Rows.Count == 0)
  745. return list;
  746. string[] temp = null;
  747. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in this.ultraGrid2.Rows)
  748. {
  749. if (ugr.Cells["TICKETYPE"].Value.ToString() == "无" || Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble
  750. (ugr.Cells["OUTSTOCKMNY"].Value) == 0)
  751. continue;
  752. string billNo = billno;
  753. string ORD_PK = ugr.Cells["ORD_PK"].Value.ToString();
  754. string ORD_LN_PK = ugr.Cells["ORD_LN_PK"].Value.ToString();
  755. string ORD_LN_DLY_PK = ugr.Cells["ORD_LN_DLY_PK"].Value.ToString();
  756. string AGENCY_FL = ugr.Cells["AGENCY_FL"].Value.ToString();
  757. string ORDER_NO = ugr.Cells["ORDERNO"].Value.ToString().Split('/')[0];
  758. string ORDER_SEQ = ugr.Cells["ORDERNO"].Value.ToString().Split('/')[1];
  759. string DELVRY_ADDR = ugr.Cells["DELVRY_ADDR"].Value.ToString();
  760. string TRANS_TYPE = ugr.Cells["TRANS_TPE"].Text;
  761. string MOTORMANNAME = this.ultraGrid1.ActiveRow.Cells["CARRY_COMPANY_NAME"].Value.ToString();
  762. string money = ugr.Cells["OUTSTOCKMNY"].Value.ToString();
  763. string moneytype = ugr.Cells["TICKETYPE"].Value.ToString();
  764. string weight = ugr.Cells["WEIGHT"].Value.ToString(); //
  765. temp = new string[] { billNo, ORD_PK, ORD_LN_PK, ORD_LN_DLY_PK, AGENCY_FL, ORDER_NO, ORDER_SEQ
  766. ,DELVRY_ADDR,TRANS_TYPE,MOTORMANNAME,money,moneytype,weight
  767. };
  768. list.Add(temp);
  769. }
  770. return list;
  771. }
  772. private System.Collections.Generic.List< string[]> GetDataStructCaption()
  773. {
  774. List<string[]> list = new List<string[]>();
  775. list.Add(new string[] { CREATE_TIME ,"创建时间"});
  776. list.Add(new string[] { BILL_TICKET_STATUS, "货款状态" });
  777. list.Add(new string[] { OUTSTOCK_TICKET_STATUS, "出库费状态" });
  778. list.Add(new string[] { TRANSMNY_TICKET_STATUS, "运费状态" });
  779. list.Add(new string[] { BILL_NO, "提单号" });
  780. list.Add(new string[] { LOADVEHICLE_TYPE, "提单类型" });
  781. list.Add(new string[] { CUSTOMER_NM, "订货单位" });
  782. list.Add(new string[] { RECEIV_NM, "收货单位" });
  783. list.Add(new string[] { CARRY_COMPANY_NAME, "承运公司" });
  784. list.Add(new string[] { ACT_COUNT, "支数" });
  785. list.Add(new string[] { ACT_WEIGHT, "重量" });
  786. list.Add(new string[] { SEND_NUM, "实发数" });
  787. list.Add(new string[] { "BILL_CK", "货款" });
  788. list.Add(new string[] { "OUTSTOCK_CK", "出库费" });
  789. list.Add(new string[] { "TRANSMNY_CK", "运费" });
  790. list.Add(new string[] { "ORDERNO", "合同号" });
  791. list.Add(new string[] { "JUDGE_STOVE_NO", "炉号" });
  792. list.Add(new string[] { "BATCH_NO", "批号" });
  793. list.Add(new string[] { "AGENCY_FL", "是否代办" });
  794. list.Add(new string[] { "DELVRY_ADDR", "交货地点" });
  795. list.Add(new string[] { "TRANS_TPE", "出厂方式" });
  796. list.Add(new string[] { "TICKETYPE", "票据类型" });
  797. list.Add(new string[] { "OUTSTOCKMNY", "费用" });
  798. list.Add(new string[] { "TKP", "付费标志" });
  799. list.Add(new string[] { "INDEX_SEQ", "序号" });
  800. list.Add(new string[] { "DESTINATION", "目的地" });
  801. list.Add(new string[] { "SPCL_LN_NM", "专用线" });
  802. list.Add(new string[] { "STATION_NM", "到站" });
  803. list.Add(new string[] { SELECT, "选择" });
  804. list.Add(new string[] { TRANSMNY, "运费" });
  805. list.Add(new string[] { "STAMP_DUTY_MONEY", "印花税" });
  806. list.Add(new string[] { "RECEIV_ADDR", "指定地点" });
  807. list.Add(new string[] { "TICKETTYPE", "单据类型" });
  808. list.Add(new string[] { "VIRSTS", "虚单理货状态" });
  809. list.Add(new string[] { "PLINE_NAME", "产线" });
  810. list.Add(new string[] { "QUANTITY", "提单支数" });
  811. list.Add(new string[] { "WEIGHT", "提单重量" });
  812. list.Add(new string[] { "INVOICEDATE", "打印时间" });
  813. list.Add(new string[] { "MANAGEMENT_NAME", "区域" });
  814. list.Add(new string[] { "SALE_ORG_DESC", "销售组织" });
  815. list.Add(new string[] { "SUPPLY_UNIT_DESC", "制造商" });
  816. list.Add(new string[] { "DISBURASES_BILL", "代垫单号" });
  817. list.Add(new string[] { "TRANS_NO", "运费发票号" });
  818. list.Add(new string[] { "TRANS_AREA", "出库地点" });
  819. return list;
  820. }
  821. private string[] GetDataStructMain()
  822. {
  823. return new string[]
  824. {
  825. this.BILL_CK,
  826. this.OUTSTOCK_CK,
  827. this.TRANSMNY_CK,
  828. CREATE_TIME,
  829. "INVOICEDATE",
  830. BILL_TICKET_STATUS,
  831. OUTSTOCK_TICKET_STATUS,
  832. TRANSMNY_TICKET_STATUS,
  833. BILL_NO,
  834. LOADVEHICLE_TYPE,
  835. "VIRSTS",
  836. CUSTOMER_NO,
  837. CUSTOMER_NM,
  838. RECEIV_NO,
  839. RECEIV_NM,
  840. "MANAGEMENT_NAME",
  841. CARRY_COMPANY_CODE,
  842. CARRY_COMPANY_NAME,
  843. ACT_COUNT,
  844. ACT_WEIGHT,
  845. "QUANTITY",
  846. "WEIGHT",
  847. SEND_NUM,
  848. "TRANS_TPE",
  849. LOADVEHICLE_TYPE,
  850. BILL_STATUS,
  851. "TRANS_AREA",
  852. "SALE_ORG_DESC",
  853. "SUPPLY_UNIT_DESC"
  854. };
  855. }
  856. private string[] GetGrid2DataStruct()
  857. {
  858. return new string[]
  859. {
  860. "ORDERNO",
  861. "JUDGE_STOVE_NO",
  862. "BATCH_NO",
  863. "PLINE_NAME",
  864. "QUANTITY",
  865. "WEIGHT",
  866. "ORD_PK",
  867. "ORD_LN_PK",
  868. "ORD_LN_DLY_PK",
  869. "AGENCY_FL",
  870. "DELVRY_ADDR",
  871. "TRANS_TPE",
  872. "TICKETYPE",
  873. "OUTSTOCKMNY",
  874. "TKP"
  875. };
  876. }
  877. private string[] GetGrid3DataStruct()
  878. {
  879. return new string[]
  880. {
  881. SELECT,
  882. TRANSMNY,
  883. "STAMP_DUTY_MONEY",
  884. "TICKETTYPE",
  885. // "INDEX_SEQ",
  886. "AGENCY_FL",
  887. "DISBURASES_BILL",
  888. "TRANS_NO"
  889. //"TRANSIT_TYP",
  890. //"DESTINATION",
  891. //"STATION_NM",
  892. //"SPCL_LN_NM",
  893. //"DELVRY_ADDR" ,
  894. //"RECEIV_ADDR",
  895. //"ORD_PK",
  896. // "ORD_LN_PK",
  897. // "ORD_LN_DLY_PK"
  898. };
  899. }
  900. private string CREATE_TIME = "CREATE_TIME";
  901. private string CUSTOMER_NO = "CUSTOMER_NO";
  902. private string CUSTOMER_NM = "CUSTOMER_NM";
  903. private string RECEIV_NO = "RECEIV_NO";
  904. private string RECEIV_NM = "RECEIV_NM";
  905. private string CARRY_COMPANY_CODE = "CARRY_COMPANY_CODE";
  906. private string CARRY_COMPANY_NAME = "CARRY_COMPANY_NAME";
  907. private string ACT_COUNT = "ACT_COUNT";
  908. private string ACT_WEIGHT = "ACT_WEIGHT";
  909. private string BILL_NO = "BILL_NO";
  910. private string SEND_NUM = "SEND_NUM";
  911. private string LOADVEHICLE_TYPE = "LOADVEHICLE_TYPE";
  912. private string BILL_TICKET_STATUS = "BILL_TICKET_STATUS";
  913. private string OUTSTOCK_TICKET_STATUS = "OUTSTOCK_TICKET_STATUS";
  914. private string TRANSMNY_TICKET_STATUS = "TRANSMNY_TICKET_STATUS";
  915. private string BILL_CK = "BILL_CK";
  916. private string OUTSTOCK_CK = "OUTSTOCK_CK";
  917. private string TRANSMNY_CK = "TRANSMNY_CK";
  918. private string ORD_PK = "ORD_PK";
  919. private string ORD_LN_PK = "ORD_LN_PK";
  920. private string ORD_LN_DLY_PK = "ORD_LN_DLY_PK";
  921. private string SELECT = "SELECT";
  922. private string TRANSMNY = "TRANSMNY";
  923. private string BILL_STATUS = "BILL_STATUS";
  924. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  925. {
  926. this.QueryGrid2();
  927. QueryGrid3();
  928. }
  929. private void textBox7_KeyPress(object sender, KeyPressEventArgs e)
  930. {
  931. if (e.KeyChar == 13)
  932. {
  933. this.Query();
  934. }
  935. }
  936. private void uchkDate_CheckedChanged(object sender, EventArgs e)
  937. {
  938. if (uchkDate.Checked)
  939. {
  940. dateTimePicker3.Enabled = true;
  941. dateTimePicker4.Enabled = true;
  942. }
  943. else
  944. {
  945. dateTimePicker3.Enabled = false;
  946. dateTimePicker4.Enabled = false;
  947. }
  948. }
  949. }
  950. }