FrmReceiveAndDebtMgt.cs 78 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689
  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. namespace Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIFrm
  11. {
  12. public partial class FrmReceiveAndDebtMgt : FrmFundBase
  13. {
  14. public FrmReceiveAndDebtMgt()
  15. {
  16. InitializeComponent();
  17. }
  18. private DataSet ds_Group = new DataSet();
  19. private DataSet ds_Gm = new DataSet();
  20. private DataSet ds_Proce = new DataSet();
  21. private DataSet ds_Adjust = new DataSet();
  22. private DataSet ds_P_Gm = new DataSet();
  23. private DataSet ds_P_Group = new DataSet();
  24. private DataSet ds_P_Ggm= new DataSet();
  25. FundBLL.ValueList.PubValueList PubValueList = null;
  26. Infragistics.Win.ValueList listBuyercode = null;
  27. private Infragistics.Win.ValueList GetStsList()
  28. {
  29. Infragistics.Win.ValueList lit = new Infragistics.Win.ValueList();
  30. lit.ValueListItems.Add("0", "未结转");
  31. lit.ValueListItems.Add("1", "已经结转");
  32. return lit;
  33. }
  34. private Infragistics.Win.ValueList GetMonthList()
  35. {
  36. Infragistics.Win.ValueList lit = new Infragistics.Win.ValueList();
  37. string mon = "";
  38. string val = "";
  39. for (int i = 0; i < 12; i++)
  40. {
  41. mon = System.DateTime.Now.AddMonths(i).ToString("yyyyMM");
  42. lit.ValueListItems.Add(mon,mon);
  43. }
  44. return lit;
  45. }
  46. private void InitDs()
  47. {
  48. ds_Group = base.GetDataSetByColumnName(this.GetDataStruct()
  49. ,null,
  50. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  51. ds_Gm = base.GetDataSetByColumnName(this.GetDataStruct()
  52. , null,
  53. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  54. ds_Proce = base.GetDataSetByColumnName(this.GetDataStruct()
  55. , null,
  56. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  57. ds_P_Gm = base.GetDataSetByColumnName(this.GetDataStruct()
  58. , base.GetNumberColumnHs(),
  59. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  60. ds_P_Group = base.GetDataSetByColumnName(this.GetDataStruct()
  61. , null,
  62. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  63. ds_P_Ggm = base.GetDataSetByColumnName(this.GetDataStruct()
  64. , null,
  65. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  66. ds_Adjust = base.GetDataSetByColumnName(this.GetDataStructAdj()
  67. , null,
  68. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  69. ChangeAdjDsCaption();
  70. this.ultraGrid1.DataSource = ds_Group;
  71. this.ultraGrid2.DataSource = ds_Gm;
  72. this.ultraGrid3.DataSource = ds_Proce;
  73. this.ultraGrid4.DataSource = ds_P_Gm;
  74. this.ultraGrid5.DataSource = ds_Adjust;
  75. }
  76. private void ChangeAdjDsCaption()
  77. {
  78. try
  79. {
  80. ds_Adjust.Tables[0].Columns[PRE_MONEY].Caption = "金额(调整前)";
  81. ds_Adjust.Tables[0].Columns["MONEY"].Caption = "金额(调整后)";
  82. ds_Adjust.Tables[0].Columns["INOUTTIME"].Caption = "时间";
  83. }
  84. catch
  85. {
  86. }
  87. }
  88. private string[] HiddenColumns()
  89. {
  90. return new string[] { this.INVOICE_MONTH, this.INVOICE_ACCOUNT, "MONEY" };
  91. }
  92. private void HiddelColumn()
  93. {
  94. foreach (UltraGrid ugs in GetAllUltraGrid())
  95. {
  96. try
  97. {
  98. foreach (string s in HiddenColumns())
  99. ugs.DisplayLayout.Bands[0].Columns[s].Hidden = true;
  100. }
  101. catch
  102. { }
  103. }
  104. this.ultraGrid4.DisplayLayout.Bands[0].Columns[this.SECONDACCOUNT].Hidden = true;
  105. this.ultraGrid4.DisplayLayout.Bands[0].Columns[this.BUYERCODE].Hidden = true;
  106. }
  107. private UltraGrid[] GetAllUltraGrid()
  108. {
  109. return new UltraGrid[] { this.ultraGrid1, this.ultraGrid2, this.ultraGrid3, this.ultraGrid4};
  110. }
  111. private void InitGrid()
  112. {
  113. foreach (UltraGrid ugs in GetAllUltraGrid())
  114. {
  115. try
  116. {
  117. ugs.DisplayLayout.Bands[0].Columns[this.PRE_MONEY].CellActivation = Activation.AllowEdit;
  118. ugs.DisplayLayout.Bands[0].Columns[this.PRE_MONEY].CellAppearance.BackColor = base.GetEditColor();
  119. ugs.DisplayLayout.Bands[0].Columns[this.PRE_MONEY].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right;
  120. ugs.DisplayLayout.Bands[0].Columns[this.INMONEY].CellAppearance.BackColor = base.GetEditColor();
  121. ugs.DisplayLayout.Bands[0].Columns[this.INVOICE_MONEY].CellAppearance.BackColor = base.GetEditColor();
  122. ugs.DisplayLayout.Bands[0].Columns[this.INVOICE_STS].ValueList = GetStsList();
  123. }
  124. catch
  125. { }
  126. }
  127. }
  128. private void InitGridValue()
  129. {
  130. foreach (UltraGrid ugs in GetAllUltraGrid())
  131. {
  132. try
  133. {
  134. ugs.DisplayLayout.Bands[0].Columns[this.BUYERCODE].ValueList =
  135. PubValueList.GetCustomerInfo();
  136. }
  137. catch
  138. { }
  139. }
  140. try
  141. {
  142. this.ultraGrid5.DisplayLayout.Bands[0].Columns[this.BUYERCODE].ValueList =
  143. PubValueList.GetCustomerInfo();
  144. }
  145. catch
  146. { }
  147. }
  148. private void InitAllAccoutBook()
  149. {
  150. InitAllBool( this.dateTimePicker2.Value.ToString("yyyyMM"));
  151. }
  152. private void InitAllBool(string month)
  153. {
  154. string sql = @"
  155. declare
  156. v_invoimon varchar2(8) := '{0}';
  157. v_int integer := 0;
  158. begin
  159. for r_info in (select distinct a.sale_area_desc,
  160. a.stlmt_unit_no buyercode,
  161. a.sale_org_desc forecorpcode,
  162. fst_drawee_unit
  163. from slm_order_head a
  164. where a.sale_org_desc <> '国际贸易部'
  165. and a.sale_area_desc is not null
  166. and a.stlmt_unit_no is not null
  167. and fst_drawee_unit is not null) loop
  168. select count(1)
  169. into v_int
  170. from sel_fund_receive_account a
  171. where a.INVOICE_MONTH = v_invoimon
  172. and invoice_account = '集团公司'
  173. and balancesubject = r_info.forecorpcode
  174. and secondaccount = r_info.sale_area_desc
  175. and buyercode = r_info.buyercode;
  176. if (v_int = 0 and r_info.forecorpcode = '国内贸易部') then
  177. insert into sel_fund_receive_account
  178. (INVOICE_MONTH,
  179. invoice_account,
  180. balancesubject,
  181. secondaccount,
  182. buyercode)
  183. select v_invoimon,
  184. '集团公司',
  185. r_info.forecorpcode,
  186. r_info.sale_area_desc,
  187. r_info.buyercode
  188. from dual;
  189. end if;
  190. select count(1)
  191. into v_int
  192. from sel_fund_receive_account a
  193. where a.INVOICE_MONTH = v_invoimon
  194. and invoice_account = '制造公司'
  195. and balancesubject = r_info.forecorpcode
  196. and secondaccount = r_info.sale_area_desc
  197. and buyercode = r_info.buyercode;
  198. if (v_int = 0) then
  199. insert into sel_fund_receive_account
  200. (INVOICE_MONTH,
  201. invoice_account,
  202. balancesubject,
  203. secondaccount,
  204. buyercode)
  205. select v_invoimon,
  206. '制造公司',
  207. r_info.forecorpcode,
  208. r_info.sale_area_desc,
  209. r_info.buyercode
  210. from dual;
  211. end if;
  212. end loop;
  213. commit;
  214. end;
  215. ";
  216. sql = string.Format(sql,month);
  217. base.ExecuteNoReader(sql);
  218. }
  219. private void ChgGroupNextInvoiceAccount()
  220. {
  221. }
  222. private DataSet GetGmMoneyInOut(string balancesubject,string buyercode,string areacode,string inmonth)
  223. {
  224. DataSet dsDetail = base.GetDataSetByColumnName(GetTbColumn_SEL_FUND_CUST_FUNDINOUT(),
  225. new System.Collections.Hashtable(), base.GetFundColumnNameAndCaption());
  226. string sqlConditon = string.Format(" and balancesubject = '{0}' ",balancesubject);
  227. sqlConditon += string.Format(" and secondaccount = '{0}' and money_deliver = '0' ", areacode);
  228. sqlConditon += string.Format(" and buyercode = '{0}' ", buyercode);
  229. sqlConditon += string.Format(" and inouttime > to_date('{0}', 'yyyymm')", inmonth);
  230. sqlConditon += string.Format(" and inouttime <= last_day(to_date('{0}', 'yyyymm')) + 1", inmonth);
  231. DataSet ds = GetMoneyInout(sqlConditon);
  232. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref dsDetail, ds);
  233. return dsDetail;
  234. }
  235. private DataSet GetGroupMoneyInOut(string balancesubject, string buyercode, string areacode, string inmonth)
  236. {
  237. DataSet dsDetail = base.GetDataSetByColumnName(GetTbColumn_SEL_FUND_CUST_FUNDINOUT(),
  238. new System.Collections.Hashtable(), base.GetFundColumnNameAndCaption());
  239. string sqlConditon = string.Format(" and balancesubject = '{0}' ", balancesubject);
  240. sqlConditon += string.Format(" and secondaccount = '{0}' ", areacode);
  241. sqlConditon += string.Format(" and buyercode = '{0}' ", buyercode);
  242. sqlConditon += string.Format(" and inouttime > to_date('{0}', 'yyyymm')", inmonth);
  243. sqlConditon += string.Format(" and inouttime <= last_day(to_date('{0}', 'yyyymm')) + 1", inmonth);
  244. sqlConditon += " and money_deliver = '2' ";
  245. DataSet ds = GetMoneyInout(sqlConditon);
  246. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref dsDetail, ds);
  247. return dsDetail;
  248. }
  249. private DataSet GetProcMoneyInOut(string balancesubject, string buyercode, string areacode, string inmonth)
  250. {
  251. DataSet dsDetail = base.GetDataSetByColumnName(GetTbColumn_SEL_FUND_CUST_FUNDINOUT(),
  252. new System.Collections.Hashtable(), base.GetFundColumnNameAndCaption());
  253. string sqlConditon = string.Format(" and balancesubject = '{0}' ", balancesubject);
  254. sqlConditon += string.Format(" and secondaccount = '{0}' ", areacode);
  255. sqlConditon += string.Format(" and buyercode = '{0}' ", buyercode);
  256. sqlConditon += string.Format(" and inouttime > to_date('{0}', 'yyyymm')", inmonth);
  257. sqlConditon += string.Format(" and inouttime <= last_day(to_date('{0}', 'yyyymm')) + 1", inmonth);
  258. sqlConditon += " and money_deliver = '1' ";
  259. DataSet ds = GetMoneyInout(sqlConditon);
  260. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref dsDetail, ds);
  261. return dsDetail;
  262. }
  263. private DataSet GetProcAllMoneyInOut(string balancesubject, string inmonth)
  264. {
  265. DataSet dsDetail = base.GetDataSetByColumnName(GetTbColumn_SEL_FUND_CUST_FUNDINOUT(),
  266. new System.Collections.Hashtable(), base.GetFundColumnNameAndCaption());
  267. string sqlConditon = "";
  268. if (balancesubject == "钢贸")
  269. {
  270. sqlConditon = " and balancesubject = '钢贸公司' and money_deliver = '0' ";
  271. }
  272. else if (balancesubject == "国贸")
  273. {
  274. sqlConditon = " and balancesubject = '国际贸易部' and money_deliver = '0' ";
  275. }
  276. else if (balancesubject == "制造")
  277. {
  278. sqlConditon = " and balancesubject = '国内贸易部' and money_deliver = '1' ";
  279. }
  280. else if (balancesubject == "集团")
  281. {
  282. sqlConditon = " and balancesubject = '国内贸易部' and money_deliver = '2' ";
  283. }
  284. sqlConditon += string.Format(" and inouttime > to_date('{0}', 'yyyymm')", inmonth);
  285. sqlConditon += string.Format(" and inouttime <= last_day(to_date('{0}', 'yyyymm')) + 1", inmonth);
  286. DataSet ds = GetMoneyInout(sqlConditon);
  287. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref dsDetail, ds);
  288. return dsDetail;
  289. }
  290. private DataSet GetGmInvoicePact(string month,string buyercode,string forecode,string salearea)
  291. {
  292. DataSet ds = base.GetDataSetByColumnName(this.GetInvoiceStruct(), null,
  293. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  294. DataSet dsData = GetGmInvoicePactByInvoiceMonthAndBuyercodeAndSaleAreaAndForeCode
  295. (month,buyercode,forecode,salearea);
  296. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref ds, dsData);
  297. return ds;
  298. }
  299. private DataSet GetGroupInvoicePact(string month, string buyercode, string forecode, string salearea)
  300. {
  301. DataSet ds = base.GetDataSetByColumnName(this.GetInvoiceStruct(), null,
  302. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  303. DataSet dsData = GetGroupInvoicePactByInvoiceMonthAndBuyercodeAndSaleAreaAndForeCode
  304. (month, buyercode, forecode, salearea);
  305. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref ds, dsData);
  306. return ds;
  307. }
  308. private DataSet GetProcInvoicePact(string month, string buyercode, string forecode, string salearea)
  309. {
  310. DataSet ds = base.GetDataSetByColumnName(this.GetInvoiceStruct(), null,
  311. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  312. DataSet dsData = GetProcInvoicePactByInvoiceMonthAndBuyercodeAndSaleAreaAndForeCode
  313. (month, buyercode, forecode, salearea);
  314. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref ds, dsData);
  315. return ds;
  316. }
  317. private DataSet GetProcAllInvoicePact(string balancesubject, string inmonth)
  318. {
  319. DataSet ds = base.GetDataSetByColumnName(this.GetInvoiceStruct(), null,
  320. base.ConvertListStringArrayToHashTable(base.GetDataStructCaption()));
  321. string sql = GetQueryOrgInvoicePact();
  322. string sqlConditon = "";
  323. if (balancesubject == "钢贸")
  324. {
  325. sqlConditon = " and fst_drawee_unit = '120604' ";
  326. }
  327. else if (balancesubject == "国贸")
  328. {
  329. sqlConditon = " and fst_drawee_unit = '120605' ";
  330. }
  331. else if (balancesubject == "制造")
  332. {
  333. sqlConditon = " and fst_drawee_unit = '120606' ";
  334. }
  335. else if (balancesubject == "集团")
  336. {
  337. sqlConditon = " and fst_drawee_unit = '120603' ";
  338. }
  339. sqlConditon += string.Format(" and realinvoiceno_date_org <= last_day(to_date('{0}', 'yyyymm')) + 1", inmonth);
  340. sqlConditon += string.Format(" and realinvoiceno_date_org > to_date('{0}', 'yyyymm')", inmonth);
  341. sql = string.Format(sql, sqlConditon);
  342. DataSet dsData = base.ExecuteReader(sql);
  343. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref ds, dsData);
  344. return ds;
  345. }
  346. private DataSet GetGmInvoicePactByInvoiceMonthAndBuyercodeAndSaleAreaAndForeCode
  347. (string month,string buyercode,string forcode,string salearea)
  348. {
  349. string sql = GetQueryInvoicePact();
  350. string sqlCondition = "";
  351. sqlCondition += string.Format(" and invoice_month = '{0}' ", month);
  352. sqlCondition += string.Format(" and buyercode = '{0}' ", buyercode);
  353. sqlCondition += string.Format(" and forecorpcode = '{0}' ", forcode);
  354. sqlCondition += string.Format(" and sale_area_desc = '{0}' ", salearea);
  355. sql = string.Format(sql,sqlCondition);
  356. DataSet ds = base.ExecuteReader(sql);
  357. return ds;
  358. }
  359. private DataSet GetGroupInvoicePactByInvoiceMonthAndBuyercodeAndSaleAreaAndForeCode
  360. (string month, string buyercode, string forcode, string salearea)
  361. {
  362. string sql = GetQueryInvoicePact();
  363. string sqlCondition = "";
  364. sqlCondition += string.Format(" and invoice_month = '{0}' ", month);
  365. sqlCondition += string.Format(" and buyercode = '{0}' ", buyercode);
  366. sqlCondition += string.Format(" and forecorpcode = '{0}' ", forcode);
  367. sqlCondition += string.Format(" and sale_area_desc = '{0}' ", salearea);
  368. sqlCondition += string.Format(" and fst_drawee_unit = '{0}' ", "120603");
  369. sql = string.Format(sql, sqlCondition);
  370. DataSet ds = base.ExecuteReader(sql);
  371. return ds;
  372. }
  373. private DataSet GetProcInvoicePactByInvoiceMonthAndBuyercodeAndSaleAreaAndForeCode
  374. (string month, string buyercode, string forcode, string salearea)
  375. {
  376. string sql = GetQueryInvoicePact();
  377. string sqlCondition = "";
  378. sqlCondition += string.Format(" and invoice_month = '{0}' ", month);
  379. sqlCondition += string.Format(" and buyercode = '{0}' ", buyercode);
  380. sqlCondition += string.Format(" and forecorpcode = '{0}' ", forcode);
  381. sqlCondition += string.Format(" and sale_area_desc = '{0}' ", salearea);
  382. sqlCondition += string.Format(" and fst_drawee_unit = '{0}' ", "120606");
  383. sql = string.Format(sql, sqlCondition);
  384. DataSet ds = base.ExecuteReader(sql);
  385. return ds;
  386. }
  387. private string GetQueryInvoicePact()
  388. {
  389. string sql = @" select a.ord_no pactno,
  390. sum(a.weight) weight,
  391. sum(a.money) money,
  392. min(a.buyername) buyername,
  393. min(a.sale_area_desc) sale_area_desc,
  394. min(b.basename) fst_drawee_unit
  395. from slm_balanceinfo a
  396. left join com_base_info b
  397. on a.fst_drawee_unit = b.basecode
  398. and b.sortcode = '1206'
  399. where a.balancestatus = '3'
  400. {0}
  401. and a.realinvoiceno is not null
  402. group by a.ord_no ";
  403. return sql;
  404. }
  405. private string GetQueryOrgInvoicePact()
  406. {
  407. string sql = @" select a.ord_no pactno,
  408. sum(a.weight) weight,
  409. sum(a.money_org) money,
  410. min(a.buyername) buyername,
  411. min(a.sale_area_desc) sale_area_desc,
  412. min(b.basename) fst_drawee_unit
  413. from slm_balanceinfo a
  414. left join com_base_info b
  415. on a.fst_drawee_unit = b.basecode
  416. and b.sortcode = '1206'
  417. where a.balancestatus_org = '3'
  418. {0}
  419. and a.realinvoiceno_org is not null
  420. group by a.ord_no ";
  421. return sql;
  422. }
  423. private DataSet GetMoneyInout(string sqlCondition)
  424. {
  425. string sql = " select * from sel_fund_cust_fundinout a where 1 = 1 and isvalid = '1' {0}";
  426. sql = string.Format(sql,sqlCondition);
  427. return base.ExecuteReader(sql);
  428. }
  429. private void FrmReceiveAndDebtMgt_Load(object sender, EventArgs e)
  430. {
  431. this.dateTimePicker2.Format = DateTimePickerFormat.Custom;
  432. this.dateTimePicker2.CustomFormat = "yyyyMM";
  433. PubValueList = new Core.StlMes.Client.Sale.SaleFundMgt.FundBLL.ValueList.PubValueList(this.ob);
  434. InitDs();
  435. HiddelColumn();
  436. InitGridValue();
  437. base.SetGridStyle(ref this.ultraGrid1, ref this.ultraGrid2, ref this.ultraGrid3,ref this.ultraGrid4,ref this.ultraGrid5);
  438. InitGrid();
  439. InitAllAccoutBook();
  440. InitGmData();
  441. }
  442. private void InitGmData()
  443. {
  444. try
  445. {
  446. if (this.CustomInfo == "3")
  447. {
  448. for (int i = 0; i < this.ultraTabControl1.Tabs.Count; i++)
  449. {
  450. if (i == 1)
  451. {
  452. this.ultraTabControl1.Tabs[i].Visible = true;
  453. this.ultraTabControl1.Tabs[i].Selected = true;
  454. }
  455. else
  456. this.ultraTabControl1.Tabs[i].Visible = false;
  457. }
  458. }
  459. if (this.CustomInfo == "4")
  460. {
  461. for (int i = 0; i < this.ultraTabControl1.Tabs.Count; i++)
  462. {
  463. if (i == 1)
  464. {
  465. this.ultraTabControl1.Tabs[i].Visible = true;
  466. }
  467. else
  468. this.ultraTabControl1.Tabs[i].Visible = false;
  469. }
  470. this.ultraTabControl1.Tabs[4].Visible = true;
  471. }
  472. }
  473. catch
  474. { }
  475. }
  476. public override void Query()
  477. {
  478. QueryAll();
  479. }
  480. public override void Update()
  481. {
  482. UpdateAll();
  483. }
  484. public override void Export()
  485. {
  486. switch (ultraTabControl1.ActiveTab.Text)
  487. {
  488. case "集团对外":
  489. Core.StlMes.Client.Sale.Util.UtilUltraGrid.ExportGridDataToExcel("账本信息", this.ultraGrid1);
  490. break;
  491. case "钢贸对外":
  492. Core.StlMes.Client.Sale.Util.UtilUltraGrid.ExportGridDataToExcel("账本信息", this.ultraGrid2);
  493. break;
  494. case "制造对外":
  495. Core.StlMes.Client.Sale.Util.UtilUltraGrid.ExportGridDataToExcel("账本信息", this.ultraGrid3);
  496. break;
  497. case "制造对内":
  498. Core.StlMes.Client.Sale.Util.UtilUltraGrid.ExportGridDataToExcel("账本信息", this.ultraGrid4);
  499. break;
  500. default:
  501. Core.StlMes.Client.Sale.Util.UtilUltraGrid.ExportGridDataToExcel("账本信息", this.ultraGrid5);
  502. break;
  503. }
  504. }
  505. private void SelectAllRows( Infragistics.Win.UltraWinGrid.UltraGrid ugr )
  506. {
  507. if (ugr == null || ugr.Rows.Count == 0)
  508. return;
  509. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugs in ugr.Rows )
  510. {
  511. ugs.Selected = true;
  512. }
  513. }
  514. public override void Add()
  515. {
  516. if (Core.StlMes.Client.Sale.Util.MessageUtil.ShowYesNoAndTips("是否确认结转") == DialogResult.No)
  517. return;
  518. if (this.ultraTabControl1.SelectedTab.Index == 1)
  519. {
  520. SelectAllRows(this.ultraGrid2);
  521. }
  522. else if (this.ultraTabControl1.SelectedTab.Index == 0)
  523. {
  524. SelectAllRows(this.ultraGrid1);
  525. }
  526. else if (this.ultraTabControl1.SelectedTab.Index == 2)
  527. {
  528. SelectAllRows(this.ultraGrid3);
  529. }
  530. else if (this.ultraTabControl1.SelectedTab.Index == 3)
  531. {
  532. SelectAllRows(this.ultraGrid4);
  533. }
  534. string errMsg = "";
  535. AddAll(GetUgrs(), out errMsg);
  536. if (errMsg.Length == 0)
  537. {
  538. Core.StlMes.Client.Sale.Util.MessageUtil.ShowTips("操作成功");
  539. }
  540. else
  541. {
  542. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError(errMsg);
  543. }
  544. QueryAll();
  545. }
  546. /// <summary>
  547. /// 结转期初,钢贸
  548. /// </summary>
  549. private void AddAll( List< Infragistics.Win.UltraWinGrid.UltraGridRow > list,out string errMsg)
  550. {
  551. errMsg = "";
  552. if (list == null || list.Count == 0)
  553. return;
  554. string actName = "";
  555. string montht = "";
  556. System.Collections.ArrayList listt = new System.Collections.ArrayList();
  557. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in list)
  558. {
  559. string premonth = ugr.Cells[this.INVOICE_MONTH].Value.ToString();
  560. DateTime dt = DateTime.ParseExact(premonth, "yyyyMM", System.Globalization.CultureInfo.CurrentCulture);
  561. if (dt > System.DateTime.Now.AddDays(-System.DateTime.Now.Day))
  562. {
  563. errMsg = "当月不能结转";
  564. return;
  565. }
  566. montht = premonth;
  567. string month = dt.AddMonths(1).ToString("yyyyMM");
  568. string invoiceacct = ugr.Cells[this.INVOICE_ACCOUNT].Value.ToString();
  569. actName = invoiceacct;
  570. string balancesubject = ugr.Cells[this.BALANCESUBJECT].Value.ToString();
  571. string buyercode = ugr.Cells[this.BUYERCODE].Value.ToString();
  572. string secaccount = ugr.Cells[this.SECONDACCOUNT].Value.ToString();
  573. double premoney = Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble(ugr.Cells[this.PRE_MONEY].Value);
  574. double inmoney = Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble(ugr.Cells[this.INMONEY].Value);
  575. double invmoney = Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble(ugr.Cells[this.INVOICE_MONEY].Value);
  576. double lstmoney = Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble(ugr.Cells[this.LST_MONEY].Value);
  577. listt.AddRange(GetSqlInserAndUpdateNextAccountBook(month, premonth, invoiceacct, balancesubject
  578. ,buyercode,secaccount,premoney,inmoney,invmoney,lstmoney));
  579. }
  580. if (actName == "集团公司")
  581. {
  582. listt.AddRange(GetUpdateGroupInvoice(montht));
  583. }
  584. if (actName == "钢贸公司")
  585. {
  586. listt.AddRange(GetUpdateGmInvoice(montht));
  587. }
  588. if (actName == "制造公司")
  589. {
  590. listt.AddRange(GetUpdateProcInvoice(montht));
  591. }
  592. base.ExecuteNoReader(listt);
  593. }
  594. private System.Collections.ArrayList GetUpdateGroupInvoice(string invoiceMonth)
  595. {
  596. System.Collections.ArrayList list = new System.Collections.ArrayList();
  597. string sql = @" update Slm_Balanceinfo set invoice_sts = '1' where invoice_month = '{0}' and balancestatus = '3'
  598. and realinvoiceno is not null and fst_drawee_unit = '120603' ";
  599. sql = string.Format(sql,invoiceMonth);
  600. string sqlT = @" update Slm_Balance_Transmoney set invoice_sts = '1' where invoice_month = '{0}' and status_cd = '2'
  601. and realinvoiceno is not null and fst_drawee_unit = '120603' ";
  602. sqlT = string.Format(sqlT, invoiceMonth);
  603. list.Add(sql);
  604. list.Add(sqlT);
  605. return list;
  606. }
  607. private System.Collections.ArrayList GetUpdateGmInvoice(string invoiceMonth)
  608. {
  609. System.Collections.ArrayList list = new System.Collections.ArrayList();
  610. string sql = @" update Slm_Balanceinfo set invoice_sts = '1' where invoice_month = '{0}' and balancestatus = '3'
  611. and realinvoiceno is not null and forecorpcode = '钢贸公司' ";
  612. sql = string.Format(sql, invoiceMonth);
  613. string sqlT = @" update Slm_Balance_Transmoney set invoice_sts = '1' where invoice_month = '{0}' and status_cd = '2'
  614. and realinvoiceno is not null and forecorpcode = '钢贸公司' ";
  615. sqlT = string.Format(sqlT, invoiceMonth);
  616. list.Add(sql);
  617. list.Add(sqlT);
  618. return list;
  619. }
  620. private System.Collections.ArrayList GetUpdateProcInvoice(string invoiceMonth)
  621. {
  622. System.Collections.ArrayList list = new System.Collections.ArrayList();
  623. string sql = @" update Slm_Balanceinfo set invoice_sts = '1' where invoice_month = '{0}' and balancestatus = '3'
  624. and realinvoiceno is not null and fst_drawee_unit = '120606' ";
  625. sql = string.Format(sql, invoiceMonth);
  626. string sqlT = @" update Slm_Balance_Transmoney set invoice_sts = '1' where invoice_month = '{0}' and status_cd = '2'
  627. and realinvoiceno is not null and fst_drawee_unit = '120606' ";
  628. sqlT = string.Format(sqlT, invoiceMonth);
  629. list.Add(sql);
  630. list.Add(sqlT);
  631. return list;
  632. }
  633. private System.Collections.ArrayList GetSqlInserAndUpdateNextAccountBook(string month, string premonth, string invoiceacct, string balancesubject,
  634. string buyercode, string secaccount, double premoney, double inmoney, double invmoney, double lstmoney
  635. )
  636. {
  637. System.Collections.ArrayList list = new System.Collections.ArrayList();
  638. string sql = @" begin insert into sel_fund_receive_account t
  639. (invoice_month,invoice_account,balancesubject,buyercode,secondaccount)
  640. select
  641. '{0}','{1}','{2}','{3}','{4}' from dual ; commit;exception when others then null; end
  642. ";
  643. string sqlUpdate = @" update sel_fund_receive_account set PRE_MONEY = {0}
  644. where invoice_account = '{1}' and invoice_month = '{2}' and balancesubject = '{3}'
  645. and buyercode = '{4}' and secondaccount = '{5}' and INVOICE_STS = '0' ";
  646. string sqlUpdatethisMonth = @" update sel_fund_receive_account set INMONEY = {0},INVOICE_MONEY = {1},
  647. LST_MONEY = {2}
  648. where invoice_account = '{3}' and invoice_month = '{4}' and balancesubject = '{5}'
  649. and buyercode = '{6}' and secondaccount = '{7}' and INVOICE_STS = '0' ";
  650. string sqlUpdateSts = @" update sel_fund_receive_account set INVOICE_STS = '1'
  651. where invoice_account = '{0}' and invoice_month = '{1}' and balancesubject = '{2}'
  652. and buyercode = '{3}' and secondaccount = '{4}' ";
  653. sql = string.Format(sql, month, invoiceacct, balancesubject, buyercode, secaccount);
  654. sqlUpdate = string.Format(sqlUpdate, lstmoney, invoiceacct, month, balancesubject,buyercode,secaccount);
  655. sqlUpdatethisMonth = string.Format(sqlUpdatethisMonth, inmoney, invmoney, lstmoney,
  656. invoiceacct, premonth, balancesubject, buyercode, secaccount
  657. );
  658. sqlUpdateSts = string.Format(sqlUpdateSts, invoiceacct, premonth, balancesubject, buyercode, secaccount);
  659. list.Add(sql);
  660. list.Add(sqlUpdate);
  661. list.Add(sqlUpdatethisMonth);
  662. list.Add(sqlUpdateSts);
  663. return list;
  664. }
  665. private void QueryAdjust()
  666. {
  667. string month = this.dateTimePicker2.Value.ToString("yyyyMM");
  668. string sql = @"select INVOICE_MONTH,
  669. INVOICE_ACCOUNT,
  670. BALANCESUBJECT,
  671. SECONDACCOUNT,
  672. BUYERCODE,
  673. PRE_MONEY,
  674. MONEY,
  675. UPDATE_PERSON,
  676. UPDATE_DATE INOUTTIME,
  677. REMARK from sel_fund_receive_adjust_detail a where 1 = 1
  678. and pre_money <> money {0} order by update_date desc ";
  679. string sqlCondition = string.Format(" and invoice_month = '{0}' ",month);
  680. sql = string.Format(sql,sqlCondition);
  681. DataSet ds = base.ExecuteReader(sql);
  682. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref this.ds_Adjust, ds);
  683. }
  684. private void QueryAll()
  685. {
  686. if (this.ultraTabControl1.SelectedTab.Index == 1)
  687. {
  688. this.QueryGm();
  689. }
  690. else if (this.ultraTabControl1.SelectedTab.Index == 0)
  691. {
  692. this.QueryGroup();
  693. }
  694. else if (this.ultraTabControl1.SelectedTab.Index == 2)
  695. {
  696. this.QueryProce();
  697. }
  698. else if (this.ultraTabControl1.SelectedTab.Index == 3)
  699. {
  700. this.QueryProceAll();
  701. }
  702. QueryAdjust();
  703. }
  704. private List<Infragistics.Win.UltraWinGrid.UltraGridRow> GetUgrs()
  705. {
  706. List<Infragistics.Win.UltraWinGrid.UltraGridRow> ugrs = new List<UltraGridRow>();
  707. if (this.ultraTabControl1.SelectedTab.Index == 1)
  708. {
  709. if (this.ultraGrid2.Rows.Count == 0)
  710. return ugrs;
  711. this.ultraGrid2.UpdateData();
  712. if (this.ultraGrid2.ActiveRow != null)
  713. this.ultraGrid2.ActiveRow.Selected = true;
  714. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in this.ultraGrid2.Selected.Rows)
  715. {
  716. ugrs.Add(ugr);
  717. }
  718. }
  719. else if (this.ultraTabControl1.SelectedTab.Index == 0)
  720. {
  721. if (this.ultraGrid1.Rows.Count == 0)
  722. return ugrs;
  723. this.ultraGrid1.UpdateData();
  724. if (this.ultraGrid1.ActiveRow != null)
  725. this.ultraGrid1.ActiveRow.Selected = true;
  726. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in this.ultraGrid1.Selected.Rows)
  727. {
  728. ugrs.Add(ugr);
  729. }
  730. }
  731. else if (this.ultraTabControl1.SelectedTab.Index == 2)
  732. {
  733. if (this.ultraGrid3.Rows.Count == 0)
  734. return ugrs;
  735. this.ultraGrid3.UpdateData();
  736. if (this.ultraGrid3.ActiveRow != null)
  737. this.ultraGrid3.ActiveRow.Selected = true;
  738. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in this.ultraGrid3.Selected.Rows)
  739. {
  740. ugrs.Add(ugr);
  741. }
  742. }
  743. else if (this.ultraTabControl1.SelectedTab.Index == 3)
  744. {
  745. if (this.ultraGrid4.Rows.Count == 0)
  746. return ugrs;
  747. this.ultraGrid4.UpdateData();
  748. if (this.ultraGrid4.ActiveRow != null)
  749. this.ultraGrid4.ActiveRow.Selected = true;
  750. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in this.ultraGrid4.Selected.Rows)
  751. {
  752. ugrs.Add(ugr);
  753. }
  754. }
  755. return ugrs;
  756. }
  757. private void UpdateAll()
  758. {
  759. UpdatePremoney(GetUgrs());
  760. this.QueryAll();
  761. }
  762. private void UpdatePremoney(List<Infragistics.Win.UltraWinGrid.UltraGridRow> ugrs)
  763. {
  764. if (ugrs == null)
  765. return;
  766. if (ugrs.Count == 0)
  767. return;
  768. System.Collections.ArrayList list = new System.Collections.ArrayList();
  769. System.Collections.ArrayList listTemp = new System.Collections.ArrayList();
  770. foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in ugrs)
  771. {
  772. if (ugr.Cells[this.INVOICE_STS].Value.ToString() == "1")
  773. {
  774. Core.StlMes.Client.Sale.Util.MessageUtil.ShowError("数据已经结转,不允许修改期初");
  775. return;
  776. }
  777. listTemp = GetUpdatePreMoney(
  778. Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble( ugr.Cells["MONEY"].Value),
  779. Core.StlMes.Client.Sale.Util.ConverObject.ConvertToDouble(ugr.Cells[PRE_MONEY].Value),
  780. CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName(),
  781. ugr.Cells[this.INVOICE_MONTH].Value.ToString(),
  782. ugr.Cells[this.INVOICE_ACCOUNT].Value.ToString(),
  783. ugr.Cells[this.BALANCESUBJECT].Value.ToString(),
  784. ugr.Cells[this.SECONDACCOUNT].Value.ToString(),
  785. ugr.Cells[this.BUYERCODE].Value.ToString(),
  786. ""
  787. );
  788. list.AddRange(listTemp);
  789. }
  790. base.ExecuteNoReader(list);
  791. // this.QueryAll();
  792. }
  793. private void QueryGm()
  794. {
  795. string month = this.dateTimePicker2.Value.ToString("yyyyMM");
  796. string sql = GetGmSql(month);
  797. DataSet ds = base.ExecuteReader(sql);
  798. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref this.ds_Gm, ds);
  799. }
  800. private void QueryGroup()
  801. {
  802. string month = this.dateTimePicker2.Value.ToString("yyyyMM");
  803. string sql = GetGroupSql(month);
  804. DataSet ds = base.ExecuteReader(sql);
  805. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref this.ds_Group, ds);
  806. }
  807. private void QueryProce()
  808. {
  809. string month = this.dateTimePicker2.Value.ToString("yyyyMM");
  810. string sql = this.GetproceSql(month);
  811. DataSet ds = base.ExecuteReader(sql);
  812. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref this.ds_Proce, ds);
  813. }
  814. private void QueryProceAll()
  815. {
  816. string month = this.dateTimePicker2.Value.ToString("yyyyMM");
  817. string sql = this.GetProceAllSql(month);
  818. DataSet ds = base.ExecuteReader(sql);
  819. Core.StlMes.Client.Sale.Util.UtilDataSet.SetDataSetByMergeSameColumnName(ref this.ds_P_Gm, ds);
  820. }
  821. private System.Collections.ArrayList GetUpdatePreMoney(double primoney, double money, string person, string month,
  822. string account,string balancesubj,string secondaccount,string buyercode,string adjusitremark
  823. )
  824. {
  825. string sql = @" update SEL_FUND_RECEIVE_ACCOUNT
  826. set PRE_MONEY = {0} ,UPDATE_PERSON = '{1}',UPDATE_DATE = sysdate
  827. where INVOICE_MONTH = '{2}' and INVOICE_ACCOUNT = '{3}'
  828. and BALANCESUBJECT = '{4}' and SECONDACCOUNT = '{5}'
  829. and BUYERCODE = '{6}'
  830. ";
  831. string sqlInsert = @" insert into SEL_FUND_RECEIVE_ADJUST_DETAIL (
  832. INVOICE_MONTH ,
  833. INVOICE_ACCOUNT ,
  834. BALANCESUBJECT ,
  835. SECONDACCOUNT ,
  836. BUYERCODE ,
  837. PRE_MONEY ,
  838. MONEY ,
  839. UPDATE_PERSON ,
  840. UPDATE_DATE ,
  841. REMARK ) values (
  842. '{0}',
  843. '{1}',
  844. '{2}',
  845. '{3}',
  846. '{4}',
  847. {5},
  848. {6},
  849. '{7}',
  850. sysdate,
  851. '{8}' )";
  852. sql = string.Format(sql,money,person,month,account,balancesubj,secondaccount,buyercode);
  853. sqlInsert = string.Format(sqlInsert, month, account, balancesubj, secondaccount, buyercode
  854. , primoney, money, person, adjusitremark
  855. );
  856. System.Collections.ArrayList list = new System.Collections.ArrayList();
  857. list.Add(sql);
  858. list.Add(sqlInsert);
  859. return list;
  860. }
  861. private string[] GetDataStruct()
  862. {
  863. return new string[]
  864. {
  865. INVOICE_MONTH,
  866. INVOICE_ACCOUNT,
  867. BALANCESUBJECT,
  868. SECONDACCOUNT,
  869. BUYERCODE,
  870. PRE_MONEY,
  871. INMONEY,
  872. INVOICE_MONEY,
  873. LST_MONEY,
  874. // INVOICE_PERSON,
  875. // INVOICE_DATE,
  876. // UPDATE_PERSON,
  877. // UPDATE_DATE,
  878. INVOICE_STS,
  879. "MONEY",
  880. ORDERNO
  881. };
  882. }
  883. private string[] GetDataStructAdj()
  884. {
  885. return new string[]
  886. {
  887. INVOICE_MONTH,
  888. INVOICE_ACCOUNT,
  889. BALANCESUBJECT,
  890. SECONDACCOUNT,
  891. BUYERCODE,
  892. PRE_MONEY,
  893. "MONEY",
  894. "UPDATE_PERSON",
  895. "INOUTTIME"
  896. };
  897. }
  898. private string[] GetInvoiceStruct()
  899. {
  900. return new string[]
  901. {
  902. "PACTNO",
  903. "WEIGHT",
  904. "MONEY",
  905. "BUYERNAME",
  906. "SALE_AREA_DESC",
  907. "FST_DRAWEE_UNIT"
  908. };
  909. }
  910. public string[] GetTbColumn_SEL_FUND_CUST_FUNDINOUT()
  911. {
  912. return new string[]
  913. {
  914. "BUSISEQ",
  915. "BALANCESUBJECT",
  916. "SECONDACCOUNT",
  917. // "BUYERCODE",
  918. "INOUTMONEY",
  919. "INOUTTIME",
  920. "FUNDTYPE",
  921. "BILLNO",
  922. // "ISVALID",
  923. // "MONEY_DELIVER",
  924. // "PREBUYERCODE",
  925. "REMARK",
  926. "IMPORTOR",
  927. "IMPORTTIME",
  928. "AFFRIMPER",
  929. "AFFRIMDATE"
  930. };
  931. }
  932. private string INVOICE_MONTH = "INVOICE_MONTH";
  933. private string INVOICE_ACCOUNT = "INVOICE_ACCOUNT";
  934. private string BALANCESUBJECT = "BALANCESUBJECT";
  935. private string SECONDACCOUNT = "SECONDACCOUNT";
  936. private string BUYERCODE = "BUYERCODE";
  937. private string PRE_MONEY = "PRE_MONEY";
  938. private string INMONEY = "INMONEY";
  939. private string INVOICE_MONEY = "INVOICE_MONEY";
  940. private string LST_MONEY = "LST_MONEY";
  941. private string INVOICE_PERSON = "INVOICE_PERSON";
  942. private string INVOICE_DATE = "INVOICE_DATE";
  943. private string UPDATE_PERSON = "UPDATE_PERSON";
  944. private string UPDATE_DATE = "UPDATE_DATE";
  945. private string INVOICE_STS = "INVOICE_STS";
  946. private string ORDERNO = "ORDERNO";
  947. private string GetQuerySqlByMonthAndAccountBook(string month,string accountBook)
  948. {
  949. string sqlStr = " select * from SEL_FUND_RECEIVE_ACCOUNT a where 1 = 1 {0}";
  950. string sqlCondition = string.Format(" and INVOICE_MONTH = '{0}' ",month);
  951. sqlCondition += string.Format(" and INVOICE_ACCOUNT = '{0}' ", accountBook);
  952. sqlStr = string.Format(sqlStr, sqlCondition);
  953. return sqlStr;
  954. }
  955. private string GetGmSql(string month)
  956. {
  957. string sql = @"
  958. select b.balancesubject,
  959. b.buyercode,
  960. b.secondaccount,
  961. nvl(b.pre_money, 0) pre_money,
  962. nvl(b.pre_money, 0) money,
  963. b.INVOICE_ACCOUNT,
  964. nvl(inmoney, nvl(c.inoutmoney, 0)) INMONEY,
  965. nvl(invoice_money, f.money) INVOICE_MONEY,
  966. nvl(lst_money, nvl(b.pre_money, 0) - nvl(c.inoutmoney, 0) + nvl( f.money,0) ) LST_MONEY,
  967. b.invoice_person,
  968. b.invoice_date,
  969. b.invoice_date,b.invoice_month,b.invoice_account,b.INVOICE_STS
  970. from SEL_FUND_RECEIVE_ACCOUNT b
  971. left join (select sum(fu.inoutmoney) inoutmoney,
  972. fu.balancesubject,
  973. fu.buyercode,
  974. fu.secondaccount
  975. from sel_fund_cust_fundinout fu
  976. where fu.isvalid = '1'
  977. and money_deliver = '0'
  978. and fu.inouttime > to_date('{0}', 'yyyymm')
  979. and fu.inouttime <=
  980. last_day(to_date('{0}', 'yyyymm')) + 1
  981. group by fu.balancesubject, fu.buyercode, fu.secondaccount) c on b.balancesubject =
  982. c.balancesubject
  983. and b.buyercode =
  984. c.buyercode
  985. and b.secondaccount =
  986. c.secondaccount
  987. left join (
  988. select sum(s.money) money, s.buyercode, s.sale_area_desc, s.forecorpcode
  989. from (select sum(s.money) money,
  990. s.buyercode,
  991. s.sale_area_desc,
  992. s.forecorpcode
  993. from slm_balanceinfo s
  994. where s.balancestatus = '3'
  995. and s.realinvoiceno is not null
  996. and s.forecorpcode = '钢贸公司'
  997. and s.invoice_month = '{0}'
  998. group by s.buyercode, s.sale_area_desc, s.forecorpcode
  999. union all
  1000. select sum(b.money), b.buyercode, c.sale_area_desc, b.forecorpname
  1001. from slm_balance_transmoney b
  1002. join slm_order_head c on b.ord_pk = c.ord_pk
  1003. where 1 = 1
  1004. and b.status_cd = '2'
  1005. and b.tickettype = '应收'
  1006. and b.invoice_month = '{0}'
  1007. and b.realinvoiceno is not null
  1008. and b.forecorpname = '钢贸公司'
  1009. group by b.buyercode, c.sale_area_desc, b.forecorpname
  1010. ) s group by
  1011. s.buyercode, s.sale_area_desc,s.forecorpcode ) f on b.balancesubject =
  1012. f.forecorpcode
  1013. and b.buyercode =
  1014. f.buyercode
  1015. and b.secondaccount =
  1016. f.sale_area_desc
  1017. where 1 = 1
  1018. and b.balancesubject = '钢贸公司'
  1019. and b.invoice_account = '钢贸公司'
  1020. and b.invoice_month = '{0}'
  1021. ";
  1022. sql = string.Format(sql,month);
  1023. return sql;
  1024. }
  1025. private string GetGroupSql(string month)
  1026. {
  1027. string sql = @"
  1028. select b.balancesubject,
  1029. b.buyercode,
  1030. b.secondaccount,
  1031. nvl(b.pre_money, 0) pre_money,
  1032. nvl(b.pre_money, 0) money,
  1033. b.INVOICE_ACCOUNT,
  1034. nvl(inmoney, nvl(c.inoutmoney, 0)) INMONEY,
  1035. nvl(invoice_money, f.money) INVOICE_MONEY,
  1036. nvl(lst_money, nvl(b.pre_money, 0) - nvl(c.inoutmoney, 0) + nvl( f.money,0) ) LST_MONEY,
  1037. b.invoice_person,
  1038. b.invoice_date,
  1039. b.invoice_date,b.invoice_month,b.invoice_account,b.INVOICE_STS
  1040. from SEL_FUND_RECEIVE_ACCOUNT b
  1041. left join (select sum(c.inoutmoney) inoutmoney,
  1042. c.balancesubject,
  1043. c. buyercode,
  1044. c.secondaccount
  1045. from (select sum(fu.inoutmoney) inoutmoney,
  1046. fu.balancesubject,
  1047. fu.buyercode buyercode,
  1048. fu.secondaccount
  1049. from sel_fund_cust_fundinout fu
  1050. where fu.isvalid = '1'
  1051. and fu.inouttime > to_date('{0}', 'yyyymm')
  1052. and fu.money_deliver = '2'
  1053. and fu.balancesubject = '国内贸易部'
  1054. -- and fu.buyercode = '1010101184'
  1055. -- and 1 = 2
  1056. and fu.inouttime <=
  1057. last_day(to_date('{0}', 'yyyymm')) + 1
  1058. group by fu.balancesubject,
  1059. fu.buyercode,
  1060. fu.secondaccount
  1061. union all
  1062. select sum(fu.inoutmoney) inoutmoney,
  1063. fu.balancesubject,
  1064. fu.buyercode,
  1065. fu.secondaccount
  1066. from sel_fund_cust_fundinout fu
  1067. where fu.isvalid = '1'
  1068. and fu.inouttime > to_date('{0}', 'yyyymm')
  1069. and fu.money_deliver = '2'
  1070. and busiseq not like '%-1'
  1071. and fu.balancesubject = '国内贸易部'
  1072. and fu.inouttime <=
  1073. last_day(to_date('{0}', 'yyyymm')) + 1
  1074. group by fu.balancesubject,
  1075. fu.buyercode,
  1076. fu.secondaccount
  1077. ) c
  1078. group by c.balancesubject, c.buyercode, c.secondaccount) c on b.balancesubject =
  1079. c.balancesubject
  1080. and b.buyercode =
  1081. c.buyercode
  1082. and b.secondaccount =
  1083. c.secondaccount
  1084. left join ( select sum(s.money) money, s.buyercode, s.sale_area_desc, s.forecorpcode
  1085. from (select sum(s.money) money,
  1086. s.buyercode,
  1087. s.sale_area_desc,
  1088. s.forecorpcode
  1089. from slm_balanceinfo s
  1090. where s.balancestatus = '3'
  1091. and s.realinvoiceno is not null
  1092. and s.fst_drawee_unit = '120603'
  1093. and s.invoice_month = '{0}'
  1094. group by s.buyercode, s.sale_area_desc, s.forecorpcode
  1095. union all
  1096. select sum(b.money), b.buyercode, c.sale_area_desc, b.forecorpname
  1097. from slm_balance_transmoney b
  1098. join slm_order_head c on b.ord_pk = c.ord_pk
  1099. where 1 = 1
  1100. and b.status_cd = '2'
  1101. and b.tickettype = '应收'
  1102. and b.realinvoiceno is not null
  1103. and b.fst_drawee_unit = '120603'
  1104. and b.invoice_month = '{0}'
  1105. group by b.buyercode, c.sale_area_desc, b.forecorpname) s
  1106. group by s.buyercode, s.sale_area_desc, s.forecorpcode ) f on b.balancesubject =
  1107. f.forecorpcode
  1108. and b.buyercode =
  1109. f.buyercode
  1110. and b.secondaccount =
  1111. f.sale_area_desc
  1112. where 1 = 1
  1113. and b.invoice_account = '集团公司'
  1114. and b.invoice_month = '{0}'
  1115. ";
  1116. sql = string.Format(sql, month);
  1117. return sql;
  1118. }
  1119. private string GetproceSql(string month)
  1120. {
  1121. string sql = @"
  1122. select b.balancesubject,
  1123. b.buyercode,
  1124. b.secondaccount,
  1125. nvl(b.pre_money, 0) pre_money,
  1126. nvl(b.pre_money, 0) money,
  1127. b.INVOICE_ACCOUNT,
  1128. nvl(inmoney, nvl(c.inoutmoney, 0)) INMONEY,
  1129. nvl(invoice_money, f.money) INVOICE_MONEY,
  1130. nvl(lst_money, nvl(b.pre_money, 0) - nvl(c.inoutmoney, 0) + nvl( f.money,0) ) LST_MONEY,
  1131. b.invoice_person,
  1132. b.invoice_date,
  1133. b.invoice_date,b.invoice_month,b.invoice_account,b.INVOICE_STS,c.orderno
  1134. from SEL_FUND_RECEIVE_ACCOUNT b
  1135. left join (select sum(c.inoutmoney) inoutmoney,
  1136. c.balancesubject,
  1137. c. buyercode,
  1138. c.secondaccount,
  1139. c.orderno
  1140. from (select sum(fu.inoutmoney) inoutmoney,
  1141. fu.balancesubject,
  1142. fu.buyercode buyercode,
  1143. fu.secondaccount,
  1144. fu.orderno
  1145. from sel_fund_cust_fundinout fu
  1146. where fu.isvalid = '1'
  1147. and fu.inouttime > to_date('{0}', 'yyyymm')
  1148. and fu.money_deliver = '1'
  1149. and fu.balancesubject = '国内贸易部'
  1150. -- and fu.buyercode = '1010101184'
  1151. -- and 1 = 2
  1152. and fu.inouttime <=
  1153. last_day(to_date('{0}', 'yyyymm')) + 1
  1154. group by fu.balancesubject,
  1155. fu.buyercode,
  1156. fu.secondaccount,
  1157. fu.orderno
  1158. ) c
  1159. group by c.balancesubject, c.buyercode, c.secondaccount,c.orderno) c on b.balancesubject =
  1160. c.balancesubject
  1161. and b.buyercode =
  1162. c.buyercode
  1163. and b.secondaccount =
  1164. c.secondaccount
  1165. left join ( select sum(s.money) money, s.buyercode, s.sale_area_desc, s.forecorpcode
  1166. from (select sum(s.money) money,
  1167. s.buyercode,
  1168. s.sale_area_desc,
  1169. s.forecorpcode
  1170. from slm_balanceinfo s
  1171. where s.balancestatus = '3'
  1172. and s.realinvoiceno is not null
  1173. and s.fst_drawee_unit = '120606'
  1174. and s.invoice_month = '{0}'
  1175. group by s.buyercode, s.sale_area_desc, s.forecorpcode
  1176. union all
  1177. select sum(b.money), b.buyercode, c.sale_area_desc, b.forecorpname
  1178. from slm_balance_transmoney b
  1179. join slm_order_head c on b.ord_pk = c.ord_pk
  1180. where 1 = 1
  1181. and b.status_cd = '2'
  1182. and b.tickettype = '应收'
  1183. and b.realinvoiceno is not null
  1184. and b.fst_drawee_unit = '120606'
  1185. and b.invoice_month = '{0}'
  1186. group by b.buyercode, c.sale_area_desc, b.forecorpname) s
  1187. group by s.buyercode, s.sale_area_desc, s.forecorpcode ) f on b.balancesubject =
  1188. f.forecorpcode
  1189. and b.buyercode =
  1190. f.buyercode
  1191. and b.secondaccount =
  1192. f.sale_area_desc
  1193. where 1 = 1
  1194. and b.invoice_account = '制造公司'
  1195. and b.invoice_month = '{0}'
  1196. ";
  1197. sql = string.Format(sql, month);
  1198. return sql;
  1199. }
  1200. private string GetProceAllSql(string month)
  1201. {
  1202. string sql = @"
  1203. select a.invoice_month,
  1204. a.invoice_account,
  1205. a.balancesubject,
  1206. a.secondaccount,
  1207. a.buyercode,
  1208. a.pre_money,
  1209. INMONEY,
  1210. invoice_money,
  1211. a.invoice_sts,
  1212. nvl(a.lst_money, nvl(pre_money,0) - nvl(INMONEY, 0) + nvl(invoice_money, 0)) lst_money
  1213. from (
  1214. select a.invoice_month,
  1215. a.invoice_account,
  1216. a.balancesubject,
  1217. a.secondaccount,
  1218. a.buyercode,
  1219. a.pre_money,
  1220. nvl(INMONEY,
  1221. case
  1222. when a.balancesubject = '钢贸' then
  1223. gm
  1224. when a.balancesubject = '国贸' then
  1225. gmx
  1226. when a.balancesubject = '集团' then
  1227. groupm
  1228. when a.balancesubject = '制造' then
  1229. prc
  1230. else
  1231. 0
  1232. end) INMONEY,
  1233. nvl(a.invoice_money,
  1234. case
  1235. when a.balancesubject = '钢贸' then
  1236. c.gmmoney1
  1237. when a.balancesubject = '国贸' then
  1238. c.gmxmoney
  1239. when a.balancesubject = '集团' then
  1240. c.groupm1
  1241. when a.balancesubject = '制造' then
  1242. c.procmoney
  1243. else
  1244. 0
  1245. end) invoice_money, a.invoice_sts,
  1246. a.lst_money
  1247. from sel_fund_receive_account a
  1248. left join (select sum(case
  1249. when a.balancesubject = '钢贸公司' and
  1250. a.money_deliver = '0' then
  1251. a.inoutmoney
  1252. else
  1253. 0
  1254. end) gm,
  1255. sum(case
  1256. when a.balancesubject = '国贸公司' and
  1257. a.money_deliver = '0' then
  1258. a.inoutmoney
  1259. else
  1260. 0
  1261. end) gmx,
  1262. sum(case
  1263. when a.balancesubject = '国内贸易部' and
  1264. a.money_deliver = '1' then
  1265. a.inoutmoney
  1266. else
  1267. 0
  1268. end) prc,
  1269. sum(case
  1270. when a.balancesubject = '国内贸易部' and
  1271. a.money_deliver = '2' then
  1272. 0
  1273. else
  1274. 0
  1275. end) groupm
  1276. from sel_fund_cust_fundinout a
  1277. where a.isvalid = '1' and inouttime > to_date('{0}', 'yyyymm') and inouttime <=
  1278. last_day(to_date('{0}', 'yyyymm')) + 1 ) t on 1 = 1
  1279. left join (select sum(case
  1280. when fst_drawee_unit = '120603' then
  1281. money
  1282. else
  1283. 0
  1284. end) groupm1,
  1285. sum(case
  1286. when fst_drawee_unit = '120604' then
  1287. money
  1288. else
  1289. 0
  1290. end) gmmoney1,
  1291. sum(case
  1292. when fst_drawee_unit = '120605' then
  1293. money
  1294. else
  1295. 0
  1296. end) gmxmoney,
  1297. sum(case
  1298. when fst_drawee_unit = '120606' then
  1299. money
  1300. else
  1301. 0
  1302. end) procmoney
  1303. from (select sum(s.money_org) money, fst_drawee_unit
  1304. from slm_balanceinfo s
  1305. where s.balancestatus_org = '3'
  1306. and s.realinvoiceno_org is not null
  1307. and s.invoice_month = '{0}'
  1308. group by fst_drawee_unit
  1309. union all
  1310. select sum(b.money), b.fst_drawee_unit
  1311. from slm_balance_transmoney b
  1312. join slm_order_head c on b.ord_pk = c.ord_pk
  1313. where 1 = 1
  1314. and b.tickettype = '应收'
  1315. and b.realinvoiceno_org is not null
  1316. and b.invoice_month = '{0}'
  1317. group by b.fst_drawee_unit)
  1318. ) c on 1 = 1
  1319. where a.invoice_month = '{0}'
  1320. and a.invoice_account = '制造全' ) a
  1321. ";
  1322. sql = string.Format(sql,month);
  1323. return sql;
  1324. }
  1325. private void ultraGrid2_ClickCell(object sender, ClickCellEventArgs e)
  1326. {
  1327. }
  1328. private void ultraGrid1_ClickCell(object sender, ClickCellEventArgs e)
  1329. {
  1330. }
  1331. private void ultraGrid3_ClickCell(object sender, ClickCellEventArgs e)
  1332. {
  1333. }
  1334. private void ultraGrid1_DoubleClickCell(object sender, DoubleClickCellEventArgs e)
  1335. {
  1336. if (e.Cell.Column.Key == INVOICE_MONEY)
  1337. {
  1338. return;
  1339. UltraGridRow ugr = e.Cell.Row;
  1340. string month = ugr.Cells[this.INVOICE_MONTH].Value.ToString();
  1341. string buyercode = ugr.Cells[this.BUYERCODE].Value.ToString();
  1342. string salearea = ugr.Cells[this.SECONDACCOUNT].Value.ToString();
  1343. string fore = ugr.Cells[this.BALANCESUBJECT].Value.ToString();
  1344. DataSet ds = this.GetGroupInvoicePact(month, buyercode, fore, salearea);
  1345. FundUI.UIDlgBox.DlgBankFrm bankfrm = new Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIDlgBox.DlgBankFrm();
  1346. bankfrm._Ds = ds;
  1347. bankfrm._FrmText = "合同查询";
  1348. bankfrm.ShowDialog();
  1349. }
  1350. if (e.Cell.Column.Key == this.INMONEY)
  1351. {
  1352. UltraGridRow ugr = e.Cell.Row;
  1353. string month = ugr.Cells[this.INVOICE_MONTH].Value.ToString();
  1354. string buyercode = ugr.Cells[this.BUYERCODE].Value.ToString();
  1355. string salearea = ugr.Cells[this.SECONDACCOUNT].Value.ToString();
  1356. string fore = ugr.Cells[this.BALANCESUBJECT].Value.ToString();
  1357. DataSet ds = this.GetGroupMoneyInOut(fore, buyercode, salearea, month);
  1358. FundUI.UIDlgBox.DlgBankFrm bankfrm = new Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIDlgBox.DlgBankFrm();
  1359. bankfrm._Ds = ds;
  1360. bankfrm._FrmText = "进出款查询";
  1361. bankfrm.ShowDialog();
  1362. }
  1363. }
  1364. private void ultraGrid2_DoubleClickCell(object sender, DoubleClickCellEventArgs e)
  1365. {
  1366. if (e.Cell.Column.Key == INVOICE_MONEY)
  1367. {
  1368. return;
  1369. UltraGridRow ugr = e.Cell.Row;
  1370. string month = ugr.Cells[this.INVOICE_MONTH].Value.ToString();
  1371. string buyercode = ugr.Cells[this.BUYERCODE].Value.ToString();
  1372. string salearea = ugr.Cells[this.SECONDACCOUNT].Value.ToString();
  1373. string fore = ugr.Cells[this.BALANCESUBJECT].Value.ToString();
  1374. DataSet ds = this.GetGmInvoicePact(month, buyercode, fore, salearea);
  1375. FundUI.UIDlgBox.DlgBankFrm bankfrm = new Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIDlgBox.DlgBankFrm();
  1376. bankfrm._Ds = ds;
  1377. bankfrm._FrmText = "合同查询";
  1378. bankfrm.ShowDialog();
  1379. }
  1380. if (e.Cell.Column.Key == this.INMONEY)
  1381. {
  1382. UltraGridRow ugr = e.Cell.Row;
  1383. string month = ugr.Cells[this.INVOICE_MONTH].Value.ToString();
  1384. string buyercode = ugr.Cells[this.BUYERCODE].Value.ToString();
  1385. string salearea = ugr.Cells[this.SECONDACCOUNT].Value.ToString();
  1386. string fore = ugr.Cells[this.BALANCESUBJECT].Value.ToString();
  1387. DataSet ds = this.GetGmMoneyInOut(fore, buyercode, salearea, month);
  1388. FundUI.UIDlgBox.DlgBankFrm bankfrm = new Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIDlgBox.DlgBankFrm();
  1389. bankfrm._Ds = ds;
  1390. bankfrm._FrmText = "进出款查询";
  1391. bankfrm.ShowDialog();
  1392. }
  1393. }
  1394. private void ultraGrid3_DoubleClickCell(object sender, DoubleClickCellEventArgs e)
  1395. {
  1396. if (e.Cell.Column.Key == INVOICE_MONEY)
  1397. {
  1398. return;
  1399. UltraGridRow ugr = e.Cell.Row;
  1400. string month = ugr.Cells[this.INVOICE_MONTH].Value.ToString();
  1401. string buyercode = ugr.Cells[this.BUYERCODE].Value.ToString();
  1402. string salearea = ugr.Cells[this.SECONDACCOUNT].Value.ToString();
  1403. string fore = ugr.Cells[this.BALANCESUBJECT].Value.ToString();
  1404. DataSet ds = this.GetProcInvoicePact(month, buyercode, fore, salearea);
  1405. FundUI.UIDlgBox.DlgBankFrm bankfrm = new Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIDlgBox.DlgBankFrm();
  1406. bankfrm._Ds = ds;
  1407. bankfrm._FrmText = "合同查询";
  1408. bankfrm.ShowDialog();
  1409. }
  1410. if (e.Cell.Column.Key == this.INMONEY)
  1411. {
  1412. UltraGridRow ugr = e.Cell.Row;
  1413. string month = ugr.Cells[this.INVOICE_MONTH].Value.ToString();
  1414. string buyercode = ugr.Cells[this.BUYERCODE].Value.ToString();
  1415. string salearea = ugr.Cells[this.SECONDACCOUNT].Value.ToString();
  1416. string fore = ugr.Cells[this.BALANCESUBJECT].Value.ToString();
  1417. DataSet ds = this.GetProcMoneyInOut(fore, buyercode, salearea, month);
  1418. FundUI.UIDlgBox.DlgBankFrm bankfrm = new Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIDlgBox.DlgBankFrm();
  1419. bankfrm._Ds = ds;
  1420. bankfrm._FrmText = "进出款查询";
  1421. bankfrm.ShowDialog();
  1422. }
  1423. }
  1424. private void ultraGrid4_AfterRowActivate(object sender, EventArgs e)
  1425. {
  1426. }
  1427. private void ultraGrid4_DoubleClickCell(object sender, DoubleClickCellEventArgs e)
  1428. {
  1429. if (e.Cell.Column.Key == INVOICE_MONEY)
  1430. {
  1431. return;
  1432. UltraGridRow ugr = e.Cell.Row;
  1433. string month = ugr.Cells[this.INVOICE_MONTH].Value.ToString();
  1434. string fore = ugr.Cells[this.BALANCESUBJECT].Value.ToString();
  1435. DataSet ds = this.GetProcAllInvoicePact(fore, month);
  1436. FundUI.UIDlgBox.DlgBankFrm bankfrm = new Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIDlgBox.DlgBankFrm();
  1437. bankfrm._Ds = ds;
  1438. bankfrm._FrmText = "合同查询";
  1439. bankfrm.ShowDialog();
  1440. }
  1441. if (e.Cell.Column.Key == this.INMONEY)
  1442. {
  1443. UltraGridRow ugr = e.Cell.Row;
  1444. string month = ugr.Cells[this.INVOICE_MONTH].Value.ToString();
  1445. string buyercode = ugr.Cells[this.BUYERCODE].Value.ToString();
  1446. string salearea = ugr.Cells[this.SECONDACCOUNT].Value.ToString();
  1447. string fore = ugr.Cells[this.BALANCESUBJECT].Value.ToString();
  1448. if (fore == "集团")
  1449. return;
  1450. DataSet ds = this.GetProcAllMoneyInOut(fore, month);
  1451. FundUI.UIDlgBox.DlgBankFrm bankfrm = new Core.StlMes.Client.Sale.SaleFundMgt.FundUI.UIDlgBox.DlgBankFrm();
  1452. bankfrm._Ds = ds;
  1453. bankfrm._FrmText = "进出款查询";
  1454. bankfrm.ShowDialog();
  1455. }
  1456. }
  1457. }
  1458. }