FrmFundInOut.cs 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246
  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. using Infragistics.Win.UltraWinGrid;
  10. using Core.Mes.Client.Comm.Control;
  11. using Core.Mes.Client.Comm.Tool;
  12. using Core.StlMes.Client.Sale.SaleFundMgt.Model;
  13. using System.IO;
  14. using NPOI.SS.UserModel;
  15. using CoreFS.CA06;
  16. using Core.Mes.Client.Comm.Format;
  17. using System.Collections;
  18. namespace Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIFrm
  19. {
  20. public partial class FrmFundInOut : FrmFundBase
  21. {
  22. public FrmFundInOut()
  23. {
  24. InitializeComponent();
  25. EntityHelper.ShowGridCaption<SelFundCustFundinoutExcel>(ultraGrid3.DisplayLayout.Bands[0]);
  26. }
  27. private DataSet dsMain = new DataSet();
  28. private DataSet dsDetail = new DataSet();
  29. private string _buyercode = "";
  30. private string _buyercodeNotChooseInfo = "未选择客户名称";
  31. private string _FrmText = "客户资金进出管理";
  32. FundBLL.ValueList.PubValueList PubValueList = null;
  33. private Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.Fund.FundBll fundBll = null;
  34. private System.Collections.Hashtable _hsDept = null;
  35. private void FrmFundInOut_Load(object sender, EventArgs e)
  36. {
  37. fundBll = new Core.StlMes.Client.Sale.BLL.SaleBusinessMgt.Fund.FundBll(this.ob);
  38. PubValueList = new Core.StlMes.Client.Sale.SaleFundMgt.FundBLL.ValueList.PubValueList(this.ob);
  39. dsMain = base.GetDataSetByColumnName(base.GetTbColumn_SEL_FUND_SEC_ACCOUNT(),
  40. new System.Collections.Hashtable(), base.GetFundColumnNameAndCaption());
  41. this.ultraGrid1.DataSource = dsMain;
  42. dsDetail = base.GetDataSetByColumnName(base.GetTbColumn_SEL_FUND_CUST_FUNDINOUT(),
  43. new System.Collections.Hashtable(), base.GetFundColumnNameAndCaption());
  44. this.ultraGrid2.DataSource = dsDetail;
  45. Init();
  46. base.SetGridStyle(ref this.ultraGrid1, ref this.ultraGrid2);
  47. _hsDept = this.GetDeptIdAndSaleArea();
  48. this.checkBox3.Visible = true;
  49. this.checkBox2.Visible = true;
  50. this.checkBox2.Checked = true;
  51. string sqlStr = "SELECT T.ORDER_NO FROM SLM_ORDER_HEAD T WHERE T.VALIDFLAG='1' ORDER BY T.ORDER_NO";
  52. DataSet dsOrder = base.ExecuteReader(sqlStr);
  53. utOrderNo.DataSource = dsOrder.Tables[0];
  54. utOrderNo.DisplayMember = "ORDER_NO";
  55. utOrderNo.ValueMember = "ORDER_NO";
  56. selFundCustFundinoutExcelBindingSource.DataSource = new List<SelFundCustFundinoutExcel>()
  57. {
  58. new SelFundCustFundinoutExcel()
  59. {
  60. InvoiceSts = "0"
  61. }
  62. };
  63. }
  64. private Infragistics.Win.ValueList GetIsValid()
  65. {
  66. Infragistics.Win.ValueList lit = new Infragistics.Win.ValueList();
  67. lit.ValueListItems.Add("0", "无效");
  68. lit.ValueListItems.Add("1", "有效");
  69. return lit;
  70. }
  71. protected override System.Collections.Hashtable GetGridColumnLength()
  72. {
  73. return base.GetGridColumnLengthDefine();
  74. }
  75. private void Init()
  76. {
  77. try
  78. {
  79. this.ultraGrid1.DisplayLayout.Bands[0].Columns["BUYERCODE"].ValueList
  80. = PubValueList.GetCustomerInfo();
  81. }
  82. catch
  83. { }
  84. try
  85. {
  86. this.ultraGrid2.DisplayLayout.Bands[0].Columns[ISVALID].ValueList
  87. = GetIsValid();
  88. }
  89. catch
  90. { }
  91. this.comboBox1.DataSource = new System.Collections.ArrayList(FundType());
  92. this.textBox4.DataSource = new System.Collections.ArrayList(FundUse());
  93. try
  94. {
  95. foreach (string s in new string[] { base._columnBalanceSubject, base._columnBuyercode })
  96. {
  97. this.ultraGrid2.DisplayLayout.Bands[0].Columns[s].Hidden = true;
  98. }
  99. }
  100. catch
  101. {
  102. }
  103. }
  104. private void button4_Click(object sender, EventArgs e)
  105. {
  106. }
  107. private string _balanceSubject = "";
  108. private string[] FundType()
  109. {
  110. return new string[] { "现金", "电汇", "纸质商业承兑", "纸质银行承兑", "转款", "抹账购管", "电子银行承兑", "电子商业承兑", "其他" };
  111. }
  112. private string[] FundUse()
  113. {
  114. return new string[] { "预付款", "货款", "提货款", "质保金", "其它" };
  115. }
  116. protected override string[] HiddenColumn()
  117. {
  118. return new string[] { };
  119. }
  120. public override void ToolBar_Click(object sender, string ToolbarKey)
  121. {
  122. if (ToolbarKey == "Query")
  123. {
  124. this.Query();
  125. }
  126. if (ToolbarKey == "Create")
  127. {
  128. this.CreateCustAccount();
  129. }
  130. if (ToolbarKey == "Close")
  131. {
  132. this.Close();
  133. }
  134. if (ToolbarKey == "InMny")
  135. {
  136. this.InMoney();
  137. }
  138. if (ToolbarKey == "OutMny")
  139. {
  140. this.OutMoney();
  141. }
  142. if (ToolbarKey == "Affrim")
  143. {
  144. this.Affrim();
  145. }
  146. if (ToolbarKey == "Print")
  147. {
  148. this.Print();
  149. }
  150. if (ToolbarKey == "Delete")
  151. {
  152. this.Delete();
  153. }
  154. if (ToolbarKey == "Template")
  155. {
  156. GridHelper.ulGridToExcel(ultraGrid3, "导入模板");
  157. }
  158. if (ToolbarKey == "Import")
  159. {
  160. this.Import();
  161. }
  162. }
  163. private void Import()
  164. {
  165. List<SelFundCustFundinoutExcel> lists = null;
  166. var openFileDialog = new OpenFileDialog
  167. {
  168. Filter = "回款|*.xls;*.xlsx"
  169. };
  170. if (openFileDialog.ShowDialog() == DialogResult.OK)
  171. {
  172. lists = ReadExcelToSelFundCustFundinoutExcel(openFileDialog.FileName);
  173. }
  174. if (lists == null) return;
  175. if (lists.Count <= 0)
  176. {
  177. MessageBox.Show("Excel无数据");
  178. return;
  179. }
  180. DataSet ds = new Core.StlMes.Client.Sale.SaleFundMgt.FundBLL.InterfaceMgt.SlmBaseCustomer(ob).GetJsBaseCustomberInfo();
  181. ArrayList lists1 = new ArrayList();
  182. foreach (SelFundCustFundinoutExcel entity in lists)
  183. {
  184. if (ds.Tables[0].Select("CUSTOMER_NM ='" + entity.Buyercode + "'").Length <= 0)
  185. {
  186. MessageBox.Show("没有查询到该" + entity.Buyercode + "客户账户!");
  187. return;
  188. }
  189. entity.Buyercode = ds.Tables[0].Select("CUSTOMER_NM ='" + entity.Buyercode + "'")[0]["CUSTOMER_NO"].ToString2();
  190. lists1.Add(JSONFormat.Format(entity));
  191. }
  192. CoreClientParam ccp = new CoreClientParam();
  193. ccp.ServerName = "com.steering.pss.sale.order.FrmFundInOut";
  194. ccp.MethodName = "save";
  195. ccp.ServerParams = new object[] { lists1 };
  196. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  197. if (ccp.ReturnCode == -1)
  198. {
  199. MessageUtil.ShowWarning(ccp.ReturnInfo);
  200. return;
  201. }
  202. if (ccp.ReturnCode == 0)
  203. {
  204. MessageUtil.ShowTips(ccp.ReturnInfo);
  205. return;
  206. }
  207. }
  208. public List<SelFundCustFundinoutExcel> ReadExcelToSelFundCustFundinoutExcel(string fileName)
  209. {
  210. //定义要返回的datatable对象
  211. List<SelFundCustFundinoutExcel> selFundCustFundinoutExcels = new List<SelFundCustFundinoutExcel>();
  212. try
  213. {
  214. if (!File.Exists(fileName))
  215. {
  216. return null;
  217. }
  218. //根据指定路径读取文件
  219. using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read))
  220. {
  221. //根据文件流创建excel数据结构
  222. NPOI.SS.UserModel.IWorkbook workbook = NPOI.SS.UserModel.WorkbookFactory.Create(fs);
  223. //IWorkbook workbook = new HSSFWorkbook(fs);
  224. for (int k = 0; k < workbook.NumberOfSheets; k++)
  225. {
  226. NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(k);
  227. if (sheet != null)
  228. {
  229. //最后一列的标号
  230. int rowCount = sheet.LastRowNum;
  231. for (int i = 1; i <= rowCount; ++i)
  232. {
  233. NPOI.SS.UserModel.IRow row = sheet.GetRow(i);
  234. if (row == null) continue; //没有数据的行默认是null       
  235. SelFundCustFundinoutExcel selFundCustFundinoutExcel = new SelFundCustFundinoutExcel();
  236. decimal inoutmoney, leavemoney;
  237. selFundCustFundinoutExcel.Busiseq = GetBusiSeq1();
  238. selFundCustFundinoutExcel.Balancesubject = GetCellValue(row.Cells[0]);
  239. selFundCustFundinoutExcel.Buyercode = GetCellValue(row.Cells[1]);
  240. decimal.TryParse(GetCellValue(row.Cells[2]), out inoutmoney);
  241. selFundCustFundinoutExcel.Inoutmoney = inoutmoney;
  242. selFundCustFundinoutExcel.Inouttime = GetCellValue(row.Cells[3]);
  243. selFundCustFundinoutExcel.Fundtype = GetCellValue(row.Cells[4]);
  244. selFundCustFundinoutExcel.Billno = GetCellValue(row.Cells[5]);
  245. selFundCustFundinoutExcel.Remark = GetCellValue(row.Cells[6]);
  246. selFundCustFundinoutExcel.Importor = GetCellValue(row.Cells[7]);
  247. selFundCustFundinoutExcel.Importtime = GetCellValue(row.Cells[8]);
  248. decimal.TryParse(GetCellValue(row.Cells[9]), out leavemoney);
  249. selFundCustFundinoutExcel.Leavemoney = leavemoney;
  250. selFundCustFundinoutExcel.Affrimper = GetCellValue(row.Cells[10]);
  251. selFundCustFundinoutExcel.Affrimdate = GetCellValue(row.Cells[11]);
  252. selFundCustFundinoutExcel.Secondaccount = GetCellValue(row.Cells[12]);
  253. selFundCustFundinoutExcel.Orderno = GetCellValue(row.Cells[13]);
  254. selFundCustFundinoutExcel.MoneyDeliver = GetCellValue(row.Cells[14]);
  255. selFundCustFundinoutExcels.Add(selFundCustFundinoutExcel);
  256. }
  257. }
  258. }
  259. }
  260. return selFundCustFundinoutExcels;
  261. }
  262. catch (Exception ex)
  263. {
  264. MessageBox.Show("EXCEL格式错误:" + ex.Message);
  265. return null;
  266. }
  267. }
  268. private string GetCellValue(ICell cell)
  269. {
  270. string value = "";
  271. switch (cell.CellType)
  272. {
  273. case CellType.Blank:
  274. value = "";
  275. break;
  276. case CellType.Numeric:
  277. short format = cell.CellStyle.DataFormat;
  278. value = cell.NumericCellValue.ToString2();
  279. break;
  280. case CellType.String:
  281. value = cell.StringCellValue;
  282. break;
  283. }
  284. return value;
  285. }
  286. private string GetBusiSeq()
  287. {
  288. string guid = "QWERTYUIOPLKJHGFDSAZXCVBNM";
  289. String busi = System.DateTime.Now.ToString("yyyyMMdd-HHmmss");
  290. int randon = new System.Random().Next(guid.Length - 2);
  291. busi = busi + guid.Substring(randon, 1).ToUpper();
  292. return busi;
  293. }
  294. private string GetBusiSeq1()
  295. {
  296. string[] arr = Guid.NewGuid().ToString().Split('-');
  297. string guid = "QWERTYUIOPLKJHGFDSAZXCVBNM";
  298. String busi = System.DateTime.Now.ToString("yyyyMMdd-HHmmss");
  299. int randon = new System.Random().Next(guid.Length - 2);
  300. busi = busi + guid.Substring(randon, 1).ToUpper();
  301. return busi + "-" + Guid.NewGuid().ToString().Split('-')[0].ToString2();
  302. }
  303. private void Print()
  304. {
  305. Infragistics.Win.UltraWinGrid.UltraGridRow ugr = null;
  306. if (this.ultraGrid2.Rows.Count == 0)
  307. return;
  308. if (this.ultraGrid2.Rows.Count == 1)
  309. ugr = this.ultraGrid2.Rows[0];
  310. else
  311. ugr = this.ultraGrid2.ActiveRow;
  312. if (ugr == null)
  313. {
  314. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(" 请选择行 ");
  315. return;
  316. }
  317. if (ugr.Cells[this.ISVALID].Value.ToString() == "1")
  318. {
  319. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(" 已经确认,不能打印 ");
  320. return;
  321. }
  322. string busiseq = ugr.Cells[BUSISEQ].Value.ToString();
  323. string url = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepInMoney.cpt&__bypagesize__=false" + "&busiseq=";
  324. url = url + busiseq;
  325. Core.StlMes.Client.SaleOrder.ReviewForm.FrmOrderRepExcel
  326. fBug = new Core.StlMes.Client.SaleOrder.ReviewForm.FrmOrderRepExcel(this.ob, url);
  327. fBug.AutoSize = true;
  328. fBug.Text = "打印进款通知单";
  329. fBug.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
  330. fBug.WindowState = FormWindowState.Maximized;
  331. fBug.Show();
  332. }
  333. private void Affrim()
  334. {
  335. try
  336. {
  337. Infragistics.Win.UltraWinGrid.UltraGridRow ugr = null;
  338. if (this.ultraGrid2.Rows.Count == 0)
  339. return;
  340. if (this.ultraGrid2.Rows.Count == 1)
  341. ugr = this.ultraGrid2.Rows[0];
  342. else
  343. ugr = this.ultraGrid2.ActiveRow;
  344. if (ugr == null)
  345. {
  346. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(" 请选择需要确认的行 ");
  347. return;
  348. }
  349. if (ugr.Cells[this.ISVALID].Value.ToString() == "1")
  350. {
  351. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(" 已经确认,不能重复确认 ");
  352. return;
  353. }
  354. string busiseq = ugr.Cells[BUSISEQ].Value.ToString();
  355. string balnacesub = ugr.Cells[BALANCESUBJECT].Value.ToString();
  356. string buyercode = ugr.Cells[BUYERCODE].Value.ToString();
  357. string fundtype = ugr.Cells[FUNDTYPE].Value.ToString();
  358. string billno = "";
  359. double money = Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble(ugr.Cells[INOUTMONEY].Value);
  360. string import = base.GetUserName();
  361. string importtime = "";
  362. string inouttime = "";
  363. string remark = "";
  364. string orderno = "";
  365. double leavemny = 0;
  366. string seccount = ugr.Cells[SECONDACCOUNT].Value.ToString();
  367. string err = "";
  368. _activeSecAccount = seccount;
  369. base.GetIInstanceCustInout().AffrimFundRecord(busiseq, balnacesub, buyercode, fundtype, billno,
  370. money, import, importtime, inouttime, remark, orderno, leavemny, seccount, out err);
  371. if (err.Length == 0)
  372. {
  373. this.Query();
  374. // this.QueryInOutDetail();
  375. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips(base._MessageSuccess);
  376. }
  377. else
  378. {
  379. // Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(err);
  380. }
  381. }
  382. catch
  383. { }
  384. }
  385. private void Delete()
  386. {
  387. try
  388. {
  389. Infragistics.Win.UltraWinGrid.UltraGridRow ugr = null;
  390. if (this.ultraGrid2.Rows.Count == 0)
  391. return;
  392. if (this.ultraGrid2.Rows.Count == 1)
  393. ugr = this.ultraGrid2.Rows[0];
  394. else
  395. ugr = this.ultraGrid2.ActiveRow;
  396. if (ugr == null)
  397. {
  398. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(" 请选择需要删除的行 ");
  399. return;
  400. }
  401. if (ugr.Cells[this.ISVALID].Value.ToString() == "1")
  402. {
  403. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(" 已经生效,不能删除 ");
  404. return;
  405. }
  406. if (Core.StlMes.Client.Sale.Util.MessageUtil.ShowYesNoAndTips("是否确认删除选择的行") == DialogResult.No)
  407. return;
  408. string busiseq = ugr.Cells[BUSISEQ].Value.ToString();
  409. string import = base.GetUserName();
  410. string err = "";
  411. string seccount = ugr.Cells[SECONDACCOUNT].Value.ToString();
  412. _activeSecAccount = seccount;
  413. base.GetIInstanceCustInout().DeleteFundRecord(busiseq, import, out err);
  414. if (err.Length == 0)
  415. {
  416. this.Query();
  417. // this.QueryInOutDetail();
  418. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips(base._MessageSuccess);
  419. }
  420. else
  421. {
  422. // Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(err);
  423. }
  424. }
  425. catch
  426. { }
  427. }
  428. private System.Collections.Hashtable GetDeptIdAndSaleArea()
  429. {
  430. System.Collections.Hashtable hs = new System.Collections.Hashtable();
  431. try
  432. {
  433. string sql = " select * from slm_base_sale_area_typ where validflag = '1' ";
  434. DataSet ds = base.ExecuteReader(sql);
  435. if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
  436. {
  437. return hs;
  438. }
  439. System.Collections.ArrayList list = null;
  440. foreach (DataRow dr in ds.Tables[0].Rows)
  441. {
  442. list = new System.Collections.ArrayList();
  443. if (hs.ContainsKey(dr["DEPARTID"].ToString()))
  444. {
  445. list = (System.Collections.ArrayList)hs[dr["DEPARTID"].ToString()];
  446. list.Add(dr["SALE_AREA_DESC"].ToString());
  447. hs.Remove(dr["DEPARTID"].ToString());
  448. hs.Add(dr["DEPARTID"].ToString(), list);
  449. }
  450. else
  451. {
  452. list.Add(dr["SALE_AREA_DESC"].ToString());
  453. hs.Add(dr["DEPARTID"].ToString(), list);
  454. }
  455. }
  456. }
  457. catch
  458. { }
  459. return hs;
  460. }
  461. private void Query()
  462. {
  463. string err = "";
  464. dsMain.Clear();
  465. Boolean isOpenFilter = !this.checkBox4.Checked;
  466. if (this.textBox1.Text.Length == 0)
  467. {
  468. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("请选择客户单位 ");
  469. return;
  470. }
  471. string sqlConditon = this.GetSqlCondition(out err);
  472. // 获取结算单位
  473. string balanceSubject = base.GetSaleOrgDesc();
  474. string buyercode = sqlConditon;
  475. DataSet ds = null;
  476. System.Collections.ArrayList list = new System.Collections.ArrayList();
  477. string deptName = "";
  478. try
  479. {
  480. list = (System.Collections.ArrayList)_hsDept[CoreFS.SA06.CoreUserInfo.UserInfo.GetDeptid()];
  481. }
  482. catch
  483. {
  484. }
  485. // DataSet ds = base.GetInstanceCustAccount().GetCustAccountByBalanceSubjectAndBuyercode(balanceSubject, buyercode);
  486. ds = base.GetInstanceSecondLevelAccount().GetSecondLevelAccountByBalanceAndBuyercode(balanceSubject, buyercode);
  487. try
  488. {
  489. if (ds.Tables[0].Rows.Count == 0)
  490. {
  491. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("无该客户账户,请先点击创建按钮创建该客户资金账户信息");
  492. return;
  493. }
  494. }
  495. catch
  496. {
  497. }
  498. if (list != null && list.Count > 0)
  499. {
  500. object[] obj = list.ToArray();
  501. string[] s = new string[obj.Length];
  502. for (int i = 0; i < s.Length; i++)
  503. {
  504. s[i] = obj[i].ToString();
  505. }
  506. if (isOpenFilter)
  507. {
  508. ds = Core.StlMes.Client.Sale.Util.UtilDataSet.GetDataSetWithRowFilter(ds, "SECONDACCOUNT", s);
  509. }
  510. }
  511. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref this.dsMain,ds);
  512. // base.InitGrid(ref this.ultraGrid1);
  513. //if (dsMain.Tables[0].Rows.Count == 0)
  514. //{
  515. // Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("无该客户账户,请先点击创建按钮创建该客户资金账户信息");
  516. // return;
  517. //}
  518. try
  519. {
  520. if (this._activeSecAccount.Length > 0)
  521. {
  522. if (this.ultraGrid1.Rows.Count > 0)
  523. {
  524. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugs in this.ultraGrid1.Rows)
  525. {
  526. if (ugs.Cells[base._columnSecondaccount].Value.ToString() == this._activeSecAccount)
  527. {
  528. ugs.Activated = true;
  529. break;
  530. }
  531. }
  532. }
  533. }
  534. }
  535. catch
  536. {
  537. }
  538. base.SetGridTimeFormat(ref this.ultraGrid1);
  539. }
  540. private void QueryWithNoTips()
  541. {
  542. string err = "";
  543. dsMain.Clear();
  544. if (this.textBox1.Text.Length == 0)
  545. {
  546. return;
  547. }
  548. string sqlConditon = this.GetSqlCondition(out err);
  549. // 获取结算单位
  550. string balanceSubject = base.GetSaleOrgDesc();
  551. string buyercode = sqlConditon;
  552. // 获取结算单位
  553. DataSet ds = null;
  554. // DataSet ds = base.GetInstanceCustAccount().GetCustAccountByBalanceSubjectAndBuyercode(balanceSubject, buyercode);
  555. ds = base.GetInstanceSecondLevelAccount().GetSecondLevelAccountByBalanceAndBuyercode(balanceSubject, buyercode);
  556. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref this.dsMain, ds);
  557. //DataSet ds = base.GetInstanceCustAccount().GetCustAccountByBalanceSubjectAndBuyercode(balanceSubject, buyercode);
  558. //Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref this.dsMain, ds);
  559. // base.InitGrid(ref this.ultraGrid1);
  560. if (dsMain.Tables[0].Rows.Count == 0)
  561. {
  562. return;
  563. }
  564. base.SetGridTimeFormat(ref this.ultraGrid1);
  565. }
  566. private void QueryInOutDetail()
  567. {
  568. string buyercode = "";
  569. UltraGridRow ugr = null;
  570. if (this.ultraGrid1.Rows.Count > 0)
  571. {
  572. ugr = this.ultraGrid1.ActiveRow;
  573. }
  574. if (this.ultraGrid1.Rows.Count == 1)
  575. ugr = this.ultraGrid1.Rows[0];
  576. if (ugr != null)
  577. {
  578. buyercode = ugr.Cells[base._columnBuyercode].Value.ToString();
  579. }
  580. string balanceSubject = ugr.Cells[base._columnBalanceSubject].Value.ToString();
  581. string begintime = this.dateTimePicker2.Value.ToString(base._dateTimeFormatYyyyMmdd);
  582. string endtime = this.dateTimePicker3.Value.ToString(base._dateTimeFormatYyyyMmdd);
  583. if (!this.checkBox1.Checked)
  584. {
  585. begintime = System.DateTime.Now.AddYears(-100).ToString(base._dateTimeFormatYyyyMmdd);
  586. endtime = System.DateTime.Now.AddYears(2).ToString(base._dateTimeFormatYyyyMmdd);
  587. }
  588. DataSet ds = base.GetIInstanceCustInout().GetSelFundCustFundInOutByBalanceAndBuyercodeAndTime
  589. (balanceSubject, buyercode, begintime, endtime);
  590. ds = Core.StlMes.Client.Sale.Util.UtilDataSet.GetDataSetWithRowFilter(ds, base._columnSecondaccount, ugr.Cells
  591. [base._columnSecondaccount].Value.ToString());
  592. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref this.dsDetail, ds);
  593. // base.InitGrid(ref this.ultraGrid2);
  594. this.HiddenGridColumn();
  595. base.SetGridTimeFormat(ref this.ultraGrid2);
  596. }
  597. private void HiddenGridColumn()
  598. {
  599. try
  600. {
  601. this.ultraGrid2.DisplayLayout.Bands[0].Columns[base._columnLeaveMoney].Hidden = true;
  602. }
  603. catch
  604. {
  605. }
  606. }
  607. private void TransferMoneyCustToSecond(double money)
  608. {
  609. try
  610. {
  611. string errMsg = "";
  612. Model.SEL_FUND_TRANS_SECONDACCOUNT sceact = GetTransSecAccount(money);
  613. if (sceact == null)
  614. return;
  615. base.GetInstanceTransfer().TransferMoneyCustToSecondAccount(sceact, out errMsg);
  616. if (errMsg.Length == 0)
  617. {
  618. MessageBox.Show(base._successMsg);
  619. }
  620. else
  621. {
  622. MessageBox.Show(errMsg);
  623. }
  624. }
  625. catch
  626. {
  627. }
  628. }
  629. private Model.SEL_FUND_TRANS_SECONDACCOUNT GetTransSecAccount(double money)
  630. {
  631. Model.SEL_FUND_TRANS_CUST cust = GetTransCustAccount(money);
  632. if (cust == null)
  633. return null;
  634. if (this.ultraGrid1.Rows.Count == 0)
  635. return null;
  636. string secondLevelAccount = this.ultraGrid1.ActiveRow.Cells[base._columnSecondaccount].Value.ToString();
  637. if (money <= 0)
  638. return null;
  639. Model.SEL_FUND_TRANS_SECONDACCOUNT sec = new Model.SEL_FUND_TRANS_SECONDACCOUNT();
  640. sec.FUND_TRANS_CUST = cust;
  641. sec.SECONDACCOUNT = secondLevelAccount;
  642. sec.TRANS_MONEY = money;
  643. return sec;
  644. }
  645. private Model.SEL_FUND_TRANS_CUST GetTransCustAccount(double money)
  646. {
  647. Infragistics.Win.UltraWinGrid.UltraGridRow ugrLeft = null;
  648. Infragistics.Win.UltraWinGrid.UltraGridRow ugrRight = null;
  649. string balancesubject = "";
  650. string buyercode = "";
  651. string secondLevelAccount = "";
  652. if (this.ultraGrid1.ActiveRow == null)
  653. return null;
  654. if (this.ultraGrid1.ActiveRow == null)
  655. return null;
  656. ugrLeft = this.ultraGrid1.ActiveRow;
  657. // money = Convert.ToDouble(this.ultraNumericEditor1.Value);
  658. if (money <= 0)
  659. return null;
  660. balancesubject = ugrLeft.Cells[base._columnBalanceSubject].Value.ToString();
  661. buyercode = ugrLeft.Cells[base._columnBuyercode].Value.ToString();
  662. secondLevelAccount = ugrLeft.Cells[base._columnSecondaccount].Value.ToString();
  663. Model.SEL_FUND_TRANS_CUST cust = new Model.SEL_FUND_TRANS_CUST();
  664. cust.BALANCESUBJECT = balancesubject;
  665. cust.BUYERCODE = buyercode;
  666. cust.TRANS_MONEY = money;
  667. cust.TRANS_PERSON = base.GetUserName();
  668. cust.TRANS_TIME = Util.DateTimeUtil.GetSystemDate();
  669. return cust;
  670. }
  671. private Model.SEL_FUND_CUST_FUNDINOUT GetSelFundCustFundInout()
  672. {
  673. Model.SEL_FUND_CUST_FUNDINOUT cust =
  674. new Model.SEL_FUND_CUST_FUNDINOUT();
  675. string buyercode = "";
  676. string balanceSubject = "";
  677. string err = "";
  678. UltraGridRow ugr = null;
  679. if (this.ultraGrid1.Rows.Count == 1)
  680. this.ultraGrid1.Rows[0].Activated = true;
  681. if (this.ultraGrid1.Rows.Count > 0)
  682. {
  683. ugr = this.ultraGrid1.ActiveRow;
  684. }
  685. if (ugr != null)
  686. {
  687. buyercode = ugr.Cells[base._columnBuyercode].Value.ToString();
  688. balanceSubject = ugr.Cells[base._columnBalanceSubject].Value.ToString();
  689. }
  690. if (buyercode.Length == 0)
  691. return null;
  692. double money = 0;
  693. try
  694. {
  695. money = Convert.ToDouble(this.ultraNumericEditor1.Value);
  696. }
  697. catch
  698. {
  699. }
  700. if (money == 0)
  701. return null;
  702. //if (IsMoneyLessThanZero(money))
  703. // return null;
  704. cust.BALANCESUBJECT = balanceSubject;
  705. cust.BUYERCODE = buyercode;
  706. cust.INOUTMONEY = money;
  707. cust.IMPORTOR = base.GetUserName();
  708. cust.INOUTTIME = this.dateTimePicker1.Value.ToString(base._dateTimeFormatYyyyMmdd) + System.DateTime.Now.ToString("HHmmss") ;
  709. cust.REMARK = this.textBox6.Text.Trim();
  710. cust.ORDERNO = this.utOrderNo.Text.Trim();
  711. cust.BILLNO = this.textBox4.Text;
  712. cust.FUNDTYPE = this.comboBox1.Text.Trim();
  713. cust.LEAVEMONEY = Convert.ToDouble( ugr.Cells[base._columnLeaveMoney].Value.ToString());
  714. return cust;
  715. }
  716. private Boolean IsMoneyLessThanZero(double money)
  717. {
  718. if (money < 0)
  719. {
  720. MessageBox.Show("资金不能为负");
  721. return true;
  722. }
  723. return false;
  724. }
  725. private void CreateCustAccount01()
  726. {
  727. string saleOrg = base.GetSaleOrgDesc();
  728. string buyercode = this._buyercode;
  729. if (this.textBox1.Text.Length == 0)
  730. {
  731. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("请选择客户单位");
  732. return;
  733. }
  734. System.Collections.Hashtable hs = new System.Collections.Hashtable();
  735. hs.Add(this.BALANCESUBJECT, saleOrg);
  736. hs.Add(this.BUYERCODE, buyercode);
  737. hs.Add(this.TOTALMONEY, 0);
  738. hs.Add(this.LEAVEMONEY, 0);
  739. hs.Add(this.IMPORTOR, base.GetUserName());
  740. hs.Add(this.IMPORTTIME, System.DateTime.Now);
  741. string errMsg = "";
  742. this.fundBll.CreateCustAccount(hs, out errMsg);
  743. if (errMsg.Length > 0)
  744. {
  745. }
  746. else
  747. {
  748. QueryWithNoTips();
  749. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips(base._MessageSuccess);
  750. return;
  751. }
  752. }
  753. private void CreateCustAccount()
  754. {
  755. string saleOrg = base.GetSaleOrgDesc();
  756. string buyercode = this._buyercode;
  757. if (this.textBox1.Text.Length == 0)
  758. {
  759. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("请选择客户单位");
  760. return;
  761. }
  762. Model.SEL_FUND_CUST_ACCOUNT account = new Core.StlMes.Client.Sale.SaleFundMgt.Model.SEL_FUND_CUST_ACCOUNT();
  763. string errMsg = "";
  764. foreach (string s in new string[] {"国内贸易部","国际贸易部" })
  765. {
  766. account = new Core.StlMes.Client.Sale.SaleFundMgt.Model.SEL_FUND_CUST_ACCOUNT();
  767. account.BALANCESUBJECT = s;
  768. account.BUYERCODE = buyercode;
  769. account.TOTALMONEY = 0;
  770. account.LEAVEMONEY = 0;
  771. account.IMPORTOR = "System";
  772. account.IMPORTTIME = Core.StlMes.Client.Sale.Util.ConverObject.ConvertDataTimeToString(System.DateTime.Now);
  773. base.GetInstanceCustAccount().CreateCustAccount(account, "System", out errMsg);
  774. }
  775. if (errMsg.Length > 0)
  776. {
  777. }
  778. else
  779. {
  780. QueryWithNoTips();
  781. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips(base._MessageSuccess);
  782. this.Query();
  783. return;
  784. }
  785. }
  786. private System.Collections.Hashtable GetInOutParam()
  787. {
  788. System.Collections.Hashtable hs = new System.Collections.Hashtable();
  789. string buyercode = "";
  790. string balanceSubject = "";
  791. string err = "";
  792. UltraGridRow ugr = null;
  793. if (this.ultraGrid1.Rows.Count == 1)
  794. this.ultraGrid1.Rows[0].Activated = true;
  795. if (this.ultraGrid1.Rows.Count > 0)
  796. {
  797. ugr = this.ultraGrid1.ActiveRow;
  798. }
  799. if (ugr != null)
  800. {
  801. buyercode = ugr.Cells[base._columnBuyercode].Value.ToString();
  802. balanceSubject = ugr.Cells[base._columnBalanceSubject].Value.ToString();
  803. }
  804. if (buyercode.Length == 0)
  805. return hs;
  806. double money = 0;
  807. try
  808. {
  809. money = Convert.ToDouble(this.ultraNumericEditor1.Value);
  810. }
  811. catch
  812. {
  813. }
  814. if (money == 0)
  815. return hs;
  816. if (IsMoneyLessThanZero(money))
  817. return hs;
  818. hs.Add(this.BALANCESUBJECT, balanceSubject);
  819. hs.Add(this.BUYERCODE, buyercode);
  820. hs.Add(this.INOUTMONEY, money);
  821. hs.Add(this.IMPORTOR, base.GetUserName());
  822. hs.Add(this.INOUTTIME, this.dateTimePicker1.Value);
  823. hs.Add(this.REMARK, this.textBox6.Text.Trim());
  824. hs.Add(this.ORDERNO, this.utOrderNo.Text.Trim());
  825. hs.Add(this.BILLNO, this.textBox4.Text.Trim());
  826. hs.Add(this.FUNDTYPE, this.comboBox1.Text.Trim());
  827. hs.Add(this.LEAVEMONEY, Convert.ToDouble(ugr.Cells[base._columnLeaveMoney].Value.ToString()));
  828. return hs;
  829. }
  830. private string _activeSecAccount = "";
  831. /// <summary>
  832. /// 写记录
  833. /// </summary>
  834. private void InMoney()
  835. {
  836. string err = "";
  837. Model.SEL_FUND_CUST_FUNDINOUT inout =
  838. this.GetSelFundCustFundInout();
  839. if (inout == null)
  840. return;
  841. Infragistics.Win.UltraWinGrid.UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  842. if (ugr == null)
  843. return;
  844. _activeSecAccount = ugr.Cells[base._columnSecondaccount].Value.ToString();
  845. String moneyDel = (this.checkBox2.Checked) ? "1" : "2";
  846. if (this.checkBox2.Checked && this.checkBox3.Checked)
  847. {
  848. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("去向只能选择一个");
  849. return;
  850. }
  851. if (this.checkBox2.Checked)
  852. moneyDel = "1";
  853. else if (this.checkBox3.Checked)
  854. moneyDel = "2";
  855. else
  856. moneyDel = "0";
  857. if (base.GetSaleOrgDesc() == "国内贸易部")
  858. {
  859. if (moneyDel == "0")
  860. {
  861. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("请选择回款去向");
  862. return;
  863. }
  864. }
  865. string busiseq = this.GetBusiSeq();
  866. base.GetIInstanceCustInout().AddFundRecord(this.GetBusiSeq(), inout.BALANCESUBJECT, inout.BUYERCODE,
  867. inout.FUNDTYPE, inout.BILLNO, inout.INOUTMONEY, inout.IMPORTOR, Util.DateTimeUtil.GetSystemDate(),
  868. inout.INOUTTIME, inout.REMARK,inout.ORDERNO,inout.LEAVEMONEY,ugr.Cells[base._columnSecondaccount].Value.ToString(),moneyDel,"", out err);
  869. /*
  870. 进款:
  871. 钢贸 每输入的一笔款项,同步也可以看成是钢贸公司给制造公司的款项
  872. 可以理解为钢贸最终客户的每笔款项,先入钢贸帐户,再入制造帐户
  873. 这里,制造的帐户由销售管理,客户为天津钢管钢铁贸易有限公司,编码为1010101184
  874. */
  875. if (base.GetSaleOrgDesc() == "钢贸公司")
  876. {
  877. if (this.checkBox2.Checked)
  878. {
  879. string remk = "原序号: " + busiseq + " 原单位:" + ugr.Cells[base._columnBuyercode].Text + ",制造进款";
  880. base.GetIInstanceCustInout().AddFundRecord(busiseq + "-1", "销售公司", inout.BUYERCODE,
  881. inout.FUNDTYPE, inout.BILLNO, inout.INOUTMONEY, inout.IMPORTOR, Util.DateTimeUtil.GetSystemDate(),
  882. inout.INOUTTIME, remk, inout.ORDERNO, 0, ugr.Cells[base._columnSecondaccount].Value.ToString(), moneyDel, inout.BUYERCODE, out err);
  883. }
  884. else if (this.checkBox3.Checked)
  885. {
  886. string remk = "原序号: " + busiseq + " 原单位:" + ugr.Cells[base._columnBuyercode].Text + ",集团进款";
  887. base.GetIInstanceCustInout().AddFundRecord(busiseq + "-1", "销售公司", inout.BUYERCODE,
  888. inout.FUNDTYPE, inout.BILLNO, inout.INOUTMONEY, inout.IMPORTOR, Util.DateTimeUtil.GetSystemDate(),
  889. inout.INOUTTIME, remk, inout.ORDERNO, 0, ugr.Cells[base._columnSecondaccount].Value.ToString(), moneyDel, inout.BUYERCODE, out err);
  890. }
  891. else
  892. {
  893. string remk = "";
  894. base.GetIInstanceCustInout().AddFundRecord(busiseq + "-1", "销售公司", inout.BUYERCODE,
  895. inout.FUNDTYPE, inout.BILLNO, inout.INOUTMONEY, inout.IMPORTOR, Util.DateTimeUtil.GetSystemDate(),
  896. inout.INOUTTIME, remk, inout.ORDERNO, 0, ugr.Cells[base._columnSecondaccount].Value.ToString(), "0", inout.BUYERCODE, out err);
  897. }
  898. }
  899. if (err.Length == 0)
  900. {
  901. // this.QueryInOutDetail();
  902. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips(base._MessageSuccess);
  903. this.Query();
  904. }
  905. else
  906. {
  907. // Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(err);
  908. }
  909. }
  910. private void InMoney02()
  911. {
  912. string err = "";
  913. System.Collections.Hashtable hs = new System.Collections.Hashtable();
  914. hs = GetInOutParam();
  915. if (hs == null || hs.Count == 0)
  916. return;
  917. this.fundBll.AddFundRecord(hs, out err);
  918. if (err.Length == 0)
  919. {
  920. this.Query();
  921. this.QueryInOutDetail();
  922. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips(base._MessageSuccess);
  923. }
  924. else
  925. {
  926. // Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(err);
  927. }
  928. }
  929. private void OutMoney()
  930. {
  931. return;
  932. //出账,资金为负
  933. // 检查当前账户的剩余资金是否足够
  934. try
  935. {
  936. string err = "";
  937. Model.SEL_FUND_CUST_FUNDINOUT inout =
  938. this.GetSelFundCustFundInout();
  939. if (inout == null)
  940. return;
  941. Infragistics.Win.UltraWinGrid.UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  942. if (ugr == null)
  943. return;
  944. _activeSecAccount = ugr.Cells[base._columnSecondaccount].Value.ToString();
  945. //Model.SEL_FUND_CUST_ACCOUNT cust = base.GetInstanceCustAccount()
  946. //.GetSelFundCustAccountByBalanceSubjectAndBuyercode(inout.BALANCESUBJECT, inout.BUYERCODE);
  947. double moneys = Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble
  948. (ugr.Cells[base._columnLeaveMoney].Value.ToString());
  949. if (moneys < inout.INOUTMONEY)
  950. {
  951. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("剩余资金不足,无法出账");
  952. return;
  953. }
  954. inout.INOUTMONEY = -inout.INOUTMONEY;
  955. //System.Collections.Hashtable hs = new System.Collections.Hashtable();
  956. //hs = GetInOutParam();
  957. //if (hs == null || hs.Count == 0)
  958. // return;
  959. //hs[this.INOUTMONEY] = -Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble(hs[this.INOUTMONEY]);
  960. //this.fundBll.AddFundRecord(hs, out err);
  961. base.GetIInstanceCustInout().AddFundRecord(inout.BALANCESUBJECT, inout.BUYERCODE,
  962. inout.FUNDTYPE, inout.BILLNO, inout.INOUTMONEY, inout.IMPORTOR, Util.DateTimeUtil.GetSystemDate(),
  963. inout.INOUTTIME, inout.REMARK, inout.ORDERNO, inout.LEAVEMONEY, ugr.Cells[base._columnSecondaccount].Value.ToString(), out err);
  964. if (err.Length == 0)
  965. {
  966. this.Query();
  967. // this.QueryInOutDetail();
  968. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips(base._MessageSuccess);
  969. }
  970. else
  971. {
  972. // Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(err);
  973. }
  974. }
  975. catch
  976. { }
  977. }
  978. private string GetSqlCondition(out string errMsg)
  979. {
  980. errMsg = "";
  981. if (_buyercode.Length == 0)
  982. {
  983. errMsg = _buyercodeNotChooseInfo;
  984. return "";
  985. }
  986. return this._buyercode;
  987. }
  988. private void button1_Click(object sender, EventArgs e)
  989. {
  990. UIDlgBox.DlgCustChoose custChoose = new Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIDlgBox.DlgCustChoose(this.ob);
  991. custChoose.CustUse = "100202";
  992. custChoose.SaleOrg = base.GetSaleOrg();
  993. custChoose.ShowDialog();
  994. if (custChoose.DialogResult == DialogResult.OK)
  995. {
  996. this.textBox1.Text = custChoose.customerName;
  997. _buyercode = custChoose.customerNo;
  998. this.Query();
  999. }
  1000. }
  1001. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  1002. {
  1003. this.QueryInOutDetail();
  1004. }
  1005. private string BALANCESUBJECT = "BALANCESUBJECT";
  1006. private string BILLNO = "BILLNO";
  1007. private string BUSISEQ = "BUSISEQ";
  1008. private string BUYERCODE = "BUYERCODE";
  1009. private string FUNDTYPE = "FUNDTYPE";
  1010. private string IMPORTOR = "IMPORTOR";
  1011. private string IMPORTTIME = "IMPORTTIME";
  1012. private string INOUTMONEY = "INOUTMONEY";
  1013. private string INOUTTIME = "INOUTTIME";
  1014. private string ISVALID = "ISVALID";
  1015. private string LEAVEMONEY = "LEAVEMONEY";
  1016. private string REMARK = "REMARK";
  1017. private string ORDERNO = "ORDERNO";
  1018. private string TOTALMONEY = "TOTALMONEY";
  1019. private string UPDATETIME = "UPDATETIME";
  1020. private string SECONDACCOUNT = "SECONDACCOUNT";
  1021. private void checkBox2_CheckedChanged(object sender, EventArgs e)
  1022. {
  1023. // this.checkBox3.Checked = !this.checkBox2.Checked;
  1024. }
  1025. private void checkBox3_CheckedChanged(object sender, EventArgs e)
  1026. {
  1027. // this.checkBox2.Checked = !this.checkBox3.Checked;
  1028. }
  1029. private void ultraNumericEditor2_MouseLeave(object sender, EventArgs e)
  1030. {
  1031. }
  1032. private void ultraNumericEditor1_MouseLeave(object sender, EventArgs e)
  1033. {
  1034. }
  1035. private void ultraNumericEditor1_KeyPress(object sender, KeyPressEventArgs e)
  1036. {
  1037. }
  1038. private void ultraNumericEditor1_KeyDown(object sender, KeyEventArgs e)
  1039. {
  1040. }
  1041. }
  1042. }