FrmMonthFinance.cs 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1. using LYFZ.ComponentLibrary;
  2. using LYFZ.Software.MainBusiness.DoorCityProcess;
  3. using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Windows.Forms;
  12. namespace LYFZ.Software.MainBusiness.StatisticalInquiry
  13. {
  14. public partial class FrmMonthFinance : LYFZ.Software.UI.StatisticalInquiry.FrmMonthFinance
  15. {
  16. private delegate void UpdateControl();
  17. public string DateTimeDay = "";
  18. LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
  19. LYFZ.BLL.BLL_ErpPayment ptbll = new BLL.BLL_ErpPayment();
  20. LYFZ.BLL.BLL_AllViewSet avsbll = new BLL.BLL_AllViewSet();
  21. LYFZ.BLL.BLL_ErpWagesSet wbsll = new BLL.BLL_ErpWagesSet();
  22. LYFZ.BLL.BLL_ErpSystemCategory scbll = new BLL.BLL_ErpSystemCategory();
  23. public FrmMonthFinance()
  24. {
  25. this.btnQuery.Click += btnQuery_Click;
  26. }
  27. /// <summary>
  28. /// 窗体加载事件
  29. /// </summary>
  30. /// <param name="sender"></param>
  31. /// <param name="e"></param>
  32. protected override void FrmMonthFinance_Shown(object sender, EventArgs e)
  33. {
  34. try
  35. {
  36. //this.Isbl = false;
  37. if (!string.IsNullOrEmpty(DateTimeDay))
  38. {
  39. this.dtpStart.DateValue = DateTimeDay + "-01";
  40. this.dtpEnd.DateValue = Convert.ToDateTime(this.dtpStart.DateValue).AddMonths(1).AddSeconds(-1).ToString();
  41. }
  42. else
  43. {
  44. this.dtpStart.DateValue = SDateTime.Now.ToString("yyyy-MM") + "-01";
  45. this.dtpEnd.DateValue = Convert.ToDateTime(this.dtpStart.DateValue).AddMonths(1).AddSeconds(-1).ToString();
  46. }
  47. this.dgvMonth.Rows.Clear();
  48. //获取订单数
  49. this.GetTodayMumberOrders();
  50. #region 获取支付方式
  51. this.cmbPay_PaymentMethod.TreeView.Nodes.Clear();
  52. DataTable tbl = orbll.GetView_Custom("tb_ErpSystemCategory", StrWhere: "", ShowColumnName: "ID,Sc_ClassCode,Sc_ClassName,Sc_ClassParentID", filedOrder: "ID desc").Tables[0];
  53. tbl.PrimaryKey = new DataColumn[] { tbl.Columns["Sc_ClassCode"] };
  54. DataRow dtRow = tbl.Rows.Find("BEBACCAFCCEAGAIHH");
  55. if (dtRow != null)
  56. {
  57. DataRow[] dtRow1 = tbl.Select("Sc_ClassParentID='" + dtRow["ID"].ToString().Trim() + "'");
  58. TreeNode root = null;
  59. for (int i = 0; i < dtRow1.Length; i++)
  60. {
  61. root = new TreeNode();
  62. if (i == 0)
  63. {
  64. root = new TreeNode(" ");
  65. this.cmbPay_PaymentMethod.TreeView.Nodes.Add(root);
  66. }
  67. root = new TreeNode(dtRow1[i]["Sc_ClassName"].ToString());
  68. root.Tag = dtRow1[i]["Sc_ClassCode"].ToString();
  69. this.CreateTreeViewShop(root.Nodes, dtRow1[i]["ID"].ToString(), tbl);
  70. this.cmbPay_PaymentMethod.TreeView.Nodes.Add(root);
  71. }
  72. }
  73. #endregion
  74. //获取文本框金额
  75. this.BindTotal();
  76. //获取每日绑定报表
  77. this.Bind();
  78. this.cmbProjectSearch.SelectedIndex = 0;
  79. this.btnExPort.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.MonthFinanceCompetence, CustomAttributes.OperatingAuthority.DataExport);
  80. // 打印
  81. this.btnPrint.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.MonthFinanceCompetence, CustomAttributes.OperatingAuthority.Print);
  82. // 财务支出
  83. if (!LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.DayFinanceCompetence, CustomAttributes.OperatingAuthority.FinancialExpenses))
  84. { this.cmbProjectSearch.Items.RemoveAt(8); }
  85. //this.Isbl = true;
  86. }
  87. catch (Exception ex)
  88. { MessageBoxCustom.Show(ex.Message); }
  89. }
  90. /// <summary>
  91. /// 获取订单数
  92. /// </summary>
  93. public void GetTodayMumberOrders()
  94. {
  95. #region 滕工
  96. string ExecuteSql = orbll.GetView_CustomReturnExecuteSql("tb_ErpOrder", StrWhere: PublicCodeClasses.GetDateTime("Ord_CreateDateTime", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0, ConnectWord: ""), ShowColumnName: "Ord_Type,Ord_Class");
  97. ExecuteSql += ";" + orbll.GetView_CustomReturnExecuteSql("tb_ErpPayment Left Join tb_ErpOrder on Ord_Number = Pay_OrdNumber and Pay_Type = '0'", StrWhere: PublicCodeClasses.GetDateTime("Pay_CreateDatetime", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0, ConnectWord: "") + " and Ord_Type is not null", ShowColumnName: "sum( Pay_AmountOf) as SumAmount ,Ord_Type", StrGroupBy: "Ord_Type");
  98. DataSet dtSet = orbll.GetView_Custom(ExecuteSql);
  99. DataTable tbl1 = dtSet.Tables["ds"];
  100. DataRow[] dtRow = tbl1.Select("Ord_Type = '0'");
  101. DataRow[] dtRow1 = tbl1.Select("Ord_Type = '1'");
  102. DataRow[] dtRow2 = tbl1.Select("Ord_Type = '2'");
  103. DataRow[] dtRow3 = tbl1.Select("Ord_Type = '3'");
  104. DataRow[] dtRow4 = tbl1.Select("Ord_Type = '4'");
  105. DataRow[] dtRow5 = tbl1.Select("Ord_Class = '0'");
  106. this.lblCount.Text = " 订单数:婚纱:" + dtRow.Length + " 儿童:" + dtRow1.Length + " 写真:" + dtRow2.Length + " 服务:" + dtRow3.Length + " 婚庆:" + dtRow4.Length + " 其中意向:" + dtRow5.Length;
  107. DataTable tbl2 = dtSet.Tables["ds1"];
  108. tbl2.PrimaryKey = new DataColumn[] { tbl2.Columns["Ord_Type"] };
  109. DataRow dtRowA = tbl2.Rows.Find("0");
  110. string StrText = "";
  111. if (dtRowA != null)
  112. { StrText += "婚纱:" + dtRowA["SumAmount"] + " "; }
  113. DataRow dtRowA1 = tbl2.Rows.Find("1");
  114. if (dtRowA1 != null)
  115. { StrText += "儿童:" + dtRowA1["SumAmount"] + " "; }
  116. DataRow dtRowA2 = tbl2.Rows.Find("2");
  117. if (dtRowA2 != null)
  118. { StrText += "写真:" + dtRowA2["SumAmount"] + " "; }
  119. DataRow dtRowA3 = tbl2.Rows.Find("3");
  120. if (dtRowA3 != null)
  121. { StrText += "服务:" + dtRowA3["SumAmount"] + " "; }
  122. DataRow dtRowA4 = tbl2.Rows.Find("4");
  123. if (dtRowA4 != null)
  124. { StrText += "婚庆:" + dtRowA4["SumAmount"] + " "; }
  125. this.lblCount.Text += "\r\n收款金额:" + StrText;
  126. #endregion
  127. }
  128. /// <summary>
  129. /// 获取下拉订单后期收入/其它消费收入
  130. /// </summary>
  131. public void CmbBindOrderLateRevenue()
  132. {
  133. this.CtvTsorder_Name.Visible = true;
  134. this.CtvTsorder_Name.TreeView.Nodes.Clear();
  135. DataTable tbl = scbll.GetList("Sc_ClassCode='BEBACDAJDFDDEACGJ'").Tables[0];
  136. tbl = scbll.GetList(" Sc_ClassParentID='" + tbl.Rows[0]["ID"].ToString() + "' and Sc_ClassCode!='BEBCADBFBCDFBGJHC' and Sc_ClassCode!='BEBCADBFBDDEGGABF' and Sc_ClassCode!='BEBCBFBICGDHCGBEJ' and Sc_ClassCode!='BEBCABBAAICBDHDHI' and Sc_ClassCode!='BEBCABBAAICJAAGDG' and Sc_ClassCode!='BEBCBFBICFCECBHFF' ").Tables[0];
  137. if (tbl.Rows.Count > 0)
  138. {
  139. TreeNode root = null;
  140. for (int i = 0; i < tbl.Rows.Count; i++)
  141. {
  142. root = new TreeNode();
  143. if (i == 0)
  144. {
  145. root = new TreeNode("全部");
  146. this.CtvTsorder_Name.TreeView.Nodes.Add(root);
  147. }
  148. root = new TreeNode(tbl.Rows[i]["Sc_ClassName"].ToString());
  149. root.Tag = tbl.Rows[i]["Sc_ClassCode"].ToString();
  150. this.CtvTsorder_Name.TreeView.Nodes.Add(root);
  151. }
  152. }
  153. }
  154. public void CmbBindCashExpenditure()
  155. {
  156. this.CtvTsorder_Name.Visible = true;
  157. this.CtvTsorder_Name.TreeView.Nodes.Clear();
  158. DataTable tbl = orbll.GetView_Custom("tb_ErpSystemCategory", StrWhere: "", ShowColumnName: "ID,Sc_ClassCode,Sc_ClassName,Sc_ClassParentID", filedOrder: "ID desc").Tables[0];
  159. tbl.PrimaryKey = new DataColumn[] { tbl.Columns["Sc_ClassCode"] };
  160. DataRow dtRow = tbl.Rows.Find("BEBACIAFBEDIGJJFE");
  161. if (dtRow != null)
  162. {
  163. DataRow[] dtRow1 = tbl.Select("Sc_ClassParentID='" + dtRow["ID"].ToString().Trim() + "'");
  164. TreeNode root = null;
  165. for (int i = 0; i < dtRow1.Length; i++)
  166. {
  167. root = new TreeNode();
  168. if (i == 0)
  169. {
  170. root = new TreeNode("全部");
  171. this.CtvTsorder_Name.TreeView.Nodes.Add(root);
  172. }
  173. root = new TreeNode(dtRow1[i]["Sc_ClassName"].ToString());
  174. root.Tag = dtRow1[i]["Sc_ClassCode"].ToString();
  175. this.CreateTreeViewShop(root.Nodes, dtRow1[i]["ID"].ToString(), tbl);
  176. this.CtvTsorder_Name.TreeView.Nodes.Add(root);
  177. }
  178. }
  179. }
  180. /// <summary>
  181. /// 绑定第三级二销名称
  182. /// </summary>
  183. /// <param name="nodes">TreeView的节点集合</param>
  184. /// <param name="dataSource">数据源</param>
  185. /// <param name="parentid"></param>
  186. private void CreateTreeViewShop(TreeNodeCollection nodes, string ClassCode, DataTable tbl)
  187. {
  188. if (ClassCode != "")
  189. {
  190. DataRow[] dtRow = tbl.Select("Sc_ClassParentID='" + ClassCode + "'");
  191. TreeNode node;
  192. for (int i = 0; i < dtRow.Length; i++)
  193. {
  194. node = new TreeNode();
  195. node.Text = dtRow[i]["Sc_ClassName"].ToString();
  196. node.Tag = dtRow[i]["Sc_ClassCode"].ToString();
  197. nodes.Add(node);
  198. }
  199. }
  200. }
  201. /// <summary>
  202. /// 获取每日绑定报表
  203. /// </summary>
  204. public void Bind()
  205. {
  206. this.dgvMonth.Rows.Clear();
  207. string time = PublicCodeClasses.GetDateTime("Pay_CreateDatetimes", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0, ConnectWord: "");// Convert.ToDateTime(this.numYear.Value + "-" + this.numMonth.Value).ToString("yyyy-MM");
  208. LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
  209. {
  210. #region 获取月报表
  211. DataTable dt = avsbll.Vw_MonthlyReport(time).Tables[0];
  212. //DataTable dt = avsbll.Vw_MonthlyReport("convert(varchar,Pay_CreateDatetimes,120) like '%" + time + "%'").Tables[0];
  213. if (dt.Rows.Count > 0)
  214. {
  215. this.Invoke(new UpdateControl(delegate()
  216. {
  217. for (int t = 0; t < dt.Rows.Count; t++)
  218. {
  219. //日订单收入
  220. decimal DayOrdersIncome = dt.Rows[t]["DayOrdersIncome"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayOrdersIncome"]);
  221. //日补款收入
  222. decimal DayReplenishmentIncome = dt.Rows[t]["DayReplenishmentIncome"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayReplenishmentIncome"]);
  223. //日后期收入
  224. decimal DayLateStageIncome = dt.Rows[t]["DayLateStageIncome"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayLateStageIncome"]);
  225. //日其它收入
  226. decimal DayOtherIncome = dt.Rows[t]["DayOtherIncome"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayOtherIncome"]);
  227. //日会员充值
  228. decimal DayMemberIncome = dt.Rows[t]["DayMemberIncome"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayMemberIncome"]);
  229. //日服务卡充值
  230. decimal DayMemberCardPaymentIncome = dt.Rows[t]["DayMemberCardPaymentIncome"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayMemberCardPaymentIncome"]);
  231. //日前期业绩
  232. decimal DayEarlyPerformance = dt.Rows[t]["DayEarlyPerformance"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayEarlyPerformance"]);
  233. //日后期业绩(加挑商品+其它消费)
  234. //加挑商品
  235. decimal DayPluslatepickPerformance = dt.Rows[t]["DayPluslatepickPerformance"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayPluslatepickPerformance"]);
  236. decimal DayOtherPerformance = dt.Rows[t]["DayOtherPerformance"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayOtherPerformance"]);
  237. //日店面支出
  238. decimal DayExpenditure = dt.Rows[t]["DayExpenditure"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayExpenditure"]);
  239. //日财务支出
  240. decimal DayExpenditure2 = dt.Rows[t]["DayExpenditure2"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[t]["DayExpenditure2"]);
  241. #region 获取月报表
  242. DataGridViewRow dgvr = new DataGridViewRow();
  243. DataGridViewCell cell = null;
  244. //日期
  245. cell = new DataGridViewTextBoxCell();
  246. cell.Value = dt.Rows[t]["Pay_CreateDatetimes"].ToString();
  247. dgvr.Cells.Add(cell);
  248. //日总收入
  249. cell = new DataGridViewTextBoxCell();
  250. cell.Value = (DayOrdersIncome + DayReplenishmentIncome + DayLateStageIncome + DayOtherIncome + DayMemberIncome + DayMemberCardPaymentIncome).ToString();
  251. dgvr.Cells.Add(cell);
  252. //日订单收入
  253. cell = new DataGridViewTextBoxCell();
  254. cell.Value = DayOrdersIncome.ToString();
  255. dgvr.Cells.Add(cell);
  256. //日补款收入
  257. cell = new DataGridViewTextBoxCell();
  258. cell.Value = DayReplenishmentIncome.ToString();
  259. dgvr.Cells.Add(cell);
  260. //日后期收入
  261. cell = new DataGridViewTextBoxCell();
  262. cell.Value = DayLateStageIncome.ToString();
  263. dgvr.Cells.Add(cell);
  264. //日其它收入
  265. cell = new DataGridViewTextBoxCell();
  266. cell.Value = DayOtherIncome.ToString();
  267. dgvr.Cells.Add(cell);
  268. //日会员充值
  269. cell = new DataGridViewTextBoxCell();
  270. cell.Value = DayMemberIncome.ToString();
  271. dgvr.Cells.Add(cell);
  272. //日服务卡充值
  273. cell = new DataGridViewTextBoxCell();
  274. cell.Value = DayMemberCardPaymentIncome.ToString();
  275. dgvr.Cells.Add(cell);
  276. //日前期业绩
  277. cell = new DataGridViewTextBoxCell();
  278. cell.Value = DayEarlyPerformance.ToString();
  279. dgvr.Cells.Add(cell);
  280. //日后期业绩
  281. cell = new DataGridViewTextBoxCell();
  282. cell.Value = (DayPluslatepickPerformance + DayOtherPerformance).ToString();
  283. dgvr.Cells.Add(cell);
  284. //日总业绩
  285. cell = new DataGridViewTextBoxCell();
  286. cell.Value = (DayEarlyPerformance + DayPluslatepickPerformance + DayOtherPerformance).ToString();
  287. dgvr.Cells.Add(cell);
  288. //日总支出
  289. cell = new DataGridViewTextBoxCell();
  290. cell.Value = (DayExpenditure + DayExpenditure2).ToString();
  291. dgvr.Cells.Add(cell);
  292. this.dgvMonth.Rows.Add(dgvr);
  293. #endregion
  294. }
  295. this.dgvMonth.ClearSelection();
  296. }));
  297. }
  298. #endregion
  299. });
  300. }
  301. #region 获取收入/营业收入/支出/订单前期/后期等金额
  302. /// <summary>
  303. /// 总押金
  304. /// </summary>
  305. /// <returns></returns>
  306. decimal Deposit()
  307. {
  308. decimal sum = wbsll.GetDressDepositSum();
  309. return sum;
  310. }
  311. /// <summary>
  312. /// 总欠款
  313. /// </summary>
  314. /// <returns></returns>
  315. decimal Arrears()
  316. {
  317. decimal sum = ptbll.GetSumArrears();
  318. return sum;
  319. }
  320. /// <summary>
  321. /// 获取订单前期
  322. /// </summary>
  323. /// <returns></returns>
  324. decimal OrderEarly()
  325. {
  326. decimal sum = 0;
  327. DataTable dt = wbsll.GetTwoPieSum(PublicCodeClasses.GetDateTime("convert(datetime,Pay_CreateDatetime)", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0, ConnectWord: "") + " and Pay_Category!='后期收款' and (Pay_PaymentMethod!='BEBACCAFEGECFBJFD' and Pay_PaymentMethod!='BEBCABAJBDFBBJGID')").Tables[0];
  328. //DataTable dt = wbsll.GetTwoPieSum(" convert(varchar,Pay_CreateDatetime,120) like '%" + time + "%' and Pay_Category!='后期收款' and (Pay_PaymentMethod!='BEBACCAFEGECFBJFD' and Pay_PaymentMethod!='BEBCABAJBDFBBJGID')").Tables[0];
  329. if (!string.IsNullOrEmpty(dt.Rows[0]["Pay_AmountOf"].ToString()))
  330. { sum = Convert.ToDecimal(dt.Rows[0]["Pay_AmountOf"]); }
  331. return sum;
  332. }
  333. /// <summary>
  334. /// 获取订单后期
  335. /// </summary>
  336. /// <returns></returns>
  337. decimal OrderLate()
  338. {
  339. decimal sum = 0;
  340. DataTable dt = wbsll.GetTwoPieSum(PublicCodeClasses.GetDateTime("convert(datetime,Pay_CreateDatetime)", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0, ConnectWord: "") + " and Pay_Category='后期收款' and (Pay_Type=0) and (Pay_PaymentMethod!='BEBACCAFEGECFBJFD' and Pay_PaymentMethod!='BEBCABAJBDFBBJGID')").Tables[0];
  341. //DataTable dt = wbsll.GetTwoPieSum("convert(varchar,Pay_CreateDatetime,120) like '%" + time + "%' and Pay_Category='后期收款' and (Pay_Type=0) and (Pay_PaymentMethod!='BEBACCAFEGECFBJFD' and Pay_PaymentMethod!='BEBCABAJBDFBBJGID')").Tables[0];
  342. if (!string.IsNullOrEmpty(dt.Rows[0]["Pay_AmountOf"].ToString()))
  343. { sum = Convert.ToDecimal(dt.Rows[0]["Pay_AmountOf"]); }
  344. return sum;
  345. }
  346. /// <summary>
  347. /// 获取收款记录金额
  348. /// </summary>
  349. /// <param name="Symbol"></param>
  350. /// <returns></returns>
  351. decimal TotalRevenueSun(string Symbol)
  352. {
  353. StringBuilder str = new StringBuilder();
  354. str.Append(Symbol);
  355. //str.Append("" + Symbol + " convert(varchar,Pay_CreateDatetime,120) like '%" + time + "%' ");
  356. str.Append(PublicCodeClasses.GetDateTime("convert(datetime,Pay_CreateDatetime)", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0, ConnectWord: ""));
  357. if (!string.IsNullOrEmpty(this.cmbPay_PaymentMethod.Text) && this.cmbPay_PaymentMethod.Tag != null)
  358. { str.Append(" and Pay_PaymentMethod='" + this.cmbPay_PaymentMethod.Tag.ToString() + "'"); }
  359. if (this.cmbProjectSearch.Text.Trim() != "全部")
  360. {
  361. //订单前期
  362. if (this.cmbProjectSearch.Text.Trim() == "订单前期收入")
  363. {
  364. if (string.IsNullOrEmpty(this.CtvTsorder_Name.Text) || this.CtvTsorder_Name.Text == "全部")
  365. { str.Append(" and Pay_Category!='后期收款'"); }
  366. else
  367. { str.Append(" and Pay_Category='" + this.CtvTsorder_Name.Text.ToString() + "'"); }
  368. }
  369. //订单后期收入
  370. if (this.cmbProjectSearch.Text.Trim() == "订单后期收入")
  371. {
  372. if (string.IsNullOrEmpty(this.CtvTsorder_Name.Text) || this.CtvTsorder_Name.Text == "全部")
  373. { str.Append(" and Pay_Category='后期收款' and Pay_Type=0"); }
  374. else
  375. { str.Append("and Pay_Category='后期收款' and Pay_Type=0 and Pay_TwoPinsCategory='" + this.CtvTsorder_Name.Tag.ToString() + "'"); }
  376. }
  377. //其它消费收入
  378. if (this.cmbProjectSearch.Text.Trim() == "其它消费收入")
  379. {
  380. if (string.IsNullOrEmpty(this.CtvTsorder_Name.Text) || this.CtvTsorder_Name.Text == "全部")
  381. { str.Append(" and Pay_Category='后期收款' and Pay_Type=1"); }
  382. else
  383. { str.Append("and Pay_Category='后期收款' and Pay_Type=1 and Pay_TwoPinsCategory='" + this.CtvTsorder_Name.Tag.ToString() + "'"); }
  384. }
  385. //礼服租售收入
  386. if (this.cmbProjectSearch.Text.Trim() == "礼服租售收入")
  387. {
  388. if (string.IsNullOrEmpty(this.CtvTsorder_Name.Text) || this.CtvTsorder_Name.Text == "全部")
  389. { str.Append(" and Pay_Category='后期收款' and Pay_Type=2"); }
  390. else
  391. { str.Append("and Pay_Category='后期收款' and Pay_Type=2 and Pay_ReceivableProject='" + this.CtvTsorder_Name.Text.ToString() + "'"); }
  392. }
  393. }
  394. DataTable dt = wbsll.GetTwoPieSum(str.ToString()).Tables[0];
  395. decimal sum = 0;
  396. if (!string.IsNullOrEmpty(dt.Rows[0]["Pay_AmountOf"].ToString()))
  397. { sum = Convert.ToDecimal(dt.Rows[0]["Pay_AmountOf"]); }
  398. return sum;
  399. }
  400. /// <summary>
  401. /// 获取其它收入金额
  402. /// </summary>
  403. /// <returns></returns>
  404. decimal OtherIncomeSum()
  405. {
  406. decimal sum = 0;
  407. StringBuilder str = new StringBuilder();
  408. str.Append("Oiae_Type='收入' " + PublicCodeClasses.GetDateTime("convert(datetime,Oiae_IEDatetime)", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0));
  409. if (!string.IsNullOrEmpty(this.cmbPay_PaymentMethod.Text) && this.cmbPay_PaymentMethod.Tag != null)
  410. { str.Append(" and Oiae_PaymentMethod='" + this.cmbPay_PaymentMethod.Tag.ToString() + "'"); }
  411. DataTable dt = wbsll.GetOtherIncomeSum(str.ToString()).Tables[0];
  412. if (!string.IsNullOrEmpty(dt.Rows[0]["Oiae_Money"].ToString()))
  413. { sum = Convert.ToDecimal(dt.Rows[0]["Oiae_Money"]); }
  414. return sum;
  415. }
  416. /// <summary>
  417. /// 获取会员充值金额
  418. /// </summary>
  419. /// <returns></returns>
  420. decimal MembersRechargeSum()
  421. {
  422. decimal sum = 0;
  423. StringBuilder str = new StringBuilder();
  424. str.Append(PublicCodeClasses.GetDateTime("convert(datetime,Mcrr_CreateDatetime)", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0, ConnectWord: ""));
  425. if (!string.IsNullOrEmpty(this.cmbPay_PaymentMethod.Text) && this.cmbPay_PaymentMethod.Tag != null)
  426. { str.Append(" and Mcrr_PaymentMethod='" + this.cmbPay_PaymentMethod.Tag.ToString() + "'"); }
  427. DataTable dt = wbsll.GetMembersRechargeSum(str.ToString()).Tables[0];
  428. if (!string.IsNullOrEmpty(dt.Rows[0]["Mcrr_RechargeAmount"].ToString()))
  429. { sum = Convert.ToDecimal(dt.Rows[0]["Mcrr_RechargeAmount"]); }
  430. return sum;
  431. }
  432. /// <summary>
  433. /// 获取服务卡消费充值金额
  434. /// </summary>
  435. /// <returns></returns>
  436. decimal MemberCardPayment()
  437. {
  438. decimal sum = 0;
  439. StringBuilder str = new StringBuilder();
  440. str.Append(PublicCodeClasses.GetDateTime("convert(datetime,创建日期)", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0));
  441. if (!string.IsNullOrEmpty(this.cmbPay_PaymentMethod.Text) && this.cmbPay_PaymentMethod.Tag != null)
  442. { str.Append(" and 付款方式编号='" + this.cmbPay_PaymentMethod.Tag.ToString() + "'"); }
  443. DataTable dt = avsbll.GetMemberCardPaymentSum(str.ToString()).Tables[0];
  444. if (!string.IsNullOrEmpty(dt.Rows[0]["收款金额"].ToString()))
  445. { sum = Convert.ToDecimal(dt.Rows[0]["收款金额"]); }
  446. return sum;
  447. }
  448. /// <summary>
  449. /// 现金支出金额
  450. /// </summary>
  451. /// <returns></returns>
  452. decimal ExpenditureSum()
  453. {
  454. decimal sum = 0;
  455. StringBuilder str = new StringBuilder();
  456. str.Append(" Oiae_Type='支出' " + PublicCodeClasses.GetDateTime("convert(datetime,Oiae_IEDatetime)", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0));
  457. if (!string.IsNullOrEmpty(this.cmbPay_PaymentMethod.Text) && this.cmbPay_PaymentMethod.Tag != null)
  458. {
  459. str.Append("and Oiae_PaymentMethod='" + this.cmbPay_PaymentMethod.Tag.ToString() + "'");
  460. //if (cmbPay_PaymentMethod.Text != "现金")
  461. //{ return 0; }
  462. }
  463. if (this.cmbProjectSearch.Text != "全部")
  464. {
  465. //现金支出
  466. if (this.cmbProjectSearch.Text == "店面支出")
  467. {
  468. if (string.IsNullOrEmpty(this.CtvTsorder_Name.Text) || this.CtvTsorder_Name.Text == "全部")
  469. { str.Append(" "); }
  470. else
  471. { str.Append("and Oiae_ProjectName='" + this.CtvTsorder_Name.Text.ToString() + "'"); }
  472. }
  473. }
  474. DataTable dt = wbsll.GetOtherIncomeSum(str.ToString()).Tables[0];
  475. if (!string.IsNullOrEmpty(dt.Rows[0]["Oiae_Money"].ToString()))
  476. { sum = Convert.ToDecimal(dt.Rows[0]["Oiae_Money"]); }
  477. return sum;
  478. }
  479. /// <summary>
  480. /// 财务支出金额
  481. /// </summary>
  482. /// <param name="Time"></param>
  483. /// <returns></returns>
  484. decimal FinancialExpensesSum()
  485. {
  486. decimal sum = 0;
  487. StringBuilder str = new StringBuilder();
  488. str.Append(" Oiae_Type='财务支出' " + PublicCodeClasses.GetDateTime("convert(datetime,Oiae_IEDatetime)", this.dtpStart.DateValue, this.dtpEnd.DateValue, DateAddDays: 0));
  489. if (!string.IsNullOrEmpty(this.cmbPay_PaymentMethod.Text) && this.cmbPay_PaymentMethod.Tag != null)
  490. {
  491. str.Append("and Oiae_PaymentMethod='" + this.cmbPay_PaymentMethod.Tag.ToString() + "'");
  492. // if (cmbPay_PaymentMethod.Text != "现金")
  493. // { return 0; }
  494. }
  495. if (this.cmbProjectSearch.Text != "全部")
  496. {
  497. //现金支出
  498. if (this.cmbProjectSearch.Text == "财务支出")
  499. {
  500. if (string.IsNullOrEmpty(this.CtvTsorder_Name.Text) || this.CtvTsorder_Name.Text == "全部")
  501. { str.Append(" "); }
  502. else
  503. { str.Append("and Oiae_ProjectName='" + this.CtvTsorder_Name.Text.ToString() + "'"); }
  504. }
  505. }
  506. DataTable dt = wbsll.GetOtherIncomeSum(str.ToString()).Tables[0];
  507. if (!string.IsNullOrEmpty(dt.Rows[0]["Oiae_Money"].ToString()))
  508. { sum = Convert.ToDecimal(dt.Rows[0]["Oiae_Money"]); }
  509. return sum;
  510. }
  511. /// <summary>
  512. /// 文本框合计获取值
  513. /// </summary>
  514. public void BindTotal()
  515. {
  516. //string time = Convert.ToDateTime(this.numYear.Value + "-" + this.numMonth.Value).ToString("yyyy-MM");
  517. if (this.cmbProjectSearch.Text == "全部")
  518. {
  519. //收入
  520. this.txtTotalRevenue.Text = (this.TotalRevenueSun("(Pay_PaymentMethod!='BEBACCAFEGECFBJFD' and Pay_PaymentMethod!='BEBCABAJBDFBBJGID') and ") + this.OtherIncomeSum()).ToString();
  521. //营业收入
  522. this.txtOperatingIncome.Text = (this.TotalRevenueSun("") + this.MembersRechargeSum() + this.MemberCardPayment()).ToString();
  523. //总支出
  524. this.txtTotalExpenditure.Text = (this.ExpenditureSum() + this.FinancialExpensesSum()).ToString();
  525. //净收入
  526. this.txtNetIncome.Text = (Convert.ToDecimal(this.txtTotalRevenue.Text) - Convert.ToDecimal(this.txtTotalExpenditure.Text)).ToString();
  527. }
  528. else if (this.cmbProjectSearch.Text == "订单前期收入")
  529. {
  530. //收入
  531. this.txtTotalRevenue.Text = this.TotalRevenueSun("(Pay_PaymentMethod!='BEBACCAFEGECFBJFD' and Pay_PaymentMethod!='BEBCABAJBDFBBJGID') and ").ToString();
  532. //营业收入
  533. this.txtOperatingIncome.Text = this.TotalRevenueSun("").ToString();
  534. //总支出
  535. this.txtTotalExpenditure.Text = "0";
  536. //净收入
  537. this.txtNetIncome.Text = (Convert.ToDecimal(this.txtTotalRevenue.Text) - Convert.ToDecimal(this.txtTotalExpenditure.Text)).ToString();
  538. }
  539. else if (this.cmbProjectSearch.Text == "订单后期收入")
  540. {
  541. //收入
  542. this.txtTotalRevenue.Text = this.TotalRevenueSun("(Pay_PaymentMethod!='BEBACCAFEGECFBJFD' and Pay_PaymentMethod!='BEBCABAJBDFBBJGID') and ").ToString();
  543. //营业收入
  544. this.txtOperatingIncome.Text = this.TotalRevenueSun("").ToString();
  545. //总支出
  546. this.txtTotalExpenditure.Text = "0";
  547. //净收入
  548. this.txtNetIncome.Text = (Convert.ToDecimal(this.txtTotalRevenue.Text) - Convert.ToDecimal(this.txtTotalExpenditure.Text)).ToString();
  549. }
  550. else if (this.cmbProjectSearch.Text == "其它消费收入")
  551. {
  552. //收入
  553. this.txtTotalRevenue.Text = this.TotalRevenueSun("(Pay_PaymentMethod!='BEBACCAFEGECFBJFD' and Pay_PaymentMethod!='BEBCABAJBDFBBJGID') and ").ToString();
  554. //营业收入
  555. this.txtOperatingIncome.Text = this.TotalRevenueSun("").ToString();
  556. //总支出
  557. this.txtTotalExpenditure.Text = "0";
  558. //净收入
  559. this.txtNetIncome.Text = (Convert.ToDecimal(this.txtTotalRevenue.Text) - Convert.ToDecimal(this.txtTotalExpenditure.Text)).ToString();
  560. }
  561. else if (this.cmbProjectSearch.Text == "其它收入")
  562. {
  563. //收入
  564. this.txtTotalRevenue.Text = this.OtherIncomeSum().ToString();
  565. //营业收入
  566. this.txtOperatingIncome.Text = "0";
  567. //总支出
  568. this.txtTotalExpenditure.Text = "0";
  569. //净收入
  570. this.txtNetIncome.Text = (Convert.ToDecimal(this.txtTotalRevenue.Text) - Convert.ToDecimal(this.txtTotalExpenditure.Text)).ToString();
  571. }
  572. else if (this.cmbProjectSearch.Text == "会员充值收入")
  573. {
  574. //收入
  575. this.txtTotalRevenue.Text = "0";// Convert.ToDecimal(Convert.ToDecimal(MembersRechargeSum(time))).ToString();
  576. //营业收入
  577. this.txtOperatingIncome.Text = this.MembersRechargeSum().ToString();
  578. //总支出
  579. this.txtTotalExpenditure.Text = "0";
  580. //净收入
  581. this.txtNetIncome.Text = (Convert.ToDecimal(this.txtTotalRevenue.Text) - Convert.ToDecimal(this.txtTotalExpenditure.Text)).ToString();
  582. }
  583. else if (this.cmbProjectSearch.Text == "服务卡消费收入")
  584. {
  585. //收入
  586. this.txtTotalRevenue.Text = "0";// Convert.ToDecimal(Convert.ToDecimal(MemberCardPayment(time))).ToString();
  587. //营业收入
  588. this.txtOperatingIncome.Text = this.MemberCardPayment().ToString();
  589. //总支出
  590. this.txtTotalExpenditure.Text = "0";
  591. //净收入
  592. this.txtNetIncome.Text = (Convert.ToDecimal(this.txtTotalRevenue.Text) - Convert.ToDecimal(this.txtTotalExpenditure.Text)).ToString();
  593. }
  594. else if (this.cmbProjectSearch.Text == "礼服租售收入")
  595. {
  596. //收入
  597. this.txtTotalRevenue.Text = this.TotalRevenueSun("(Pay_PaymentMethod!='BEBACCAFEGECFBJFD' and Pay_PaymentMethod!='BEBCABAJBDFBBJGID') and ").ToString();
  598. //营业收入
  599. this.txtOperatingIncome.Text = this.TotalRevenueSun("").ToString();
  600. //总支出
  601. this.txtTotalExpenditure.Text = "0";
  602. //净收入
  603. this.txtNetIncome.Text = (Convert.ToDecimal(this.txtTotalRevenue.Text) - Convert.ToDecimal(this.txtTotalExpenditure.Text)).ToString();
  604. }
  605. else if (this.cmbProjectSearch.Text == "店面支出")
  606. {
  607. //收入
  608. this.txtTotalRevenue.Text = "0";
  609. //营业收入
  610. this.txtOperatingIncome.Text = "0";
  611. //总支出
  612. this.txtTotalExpenditure.Text = this.ExpenditureSum().ToString();
  613. //净收入
  614. this.txtNetIncome.Text = (Convert.ToDecimal(this.txtTotalRevenue.Text) - Convert.ToDecimal(this.txtTotalExpenditure.Text)).ToString();
  615. }
  616. else if (this.cmbProjectSearch.Text == "财务支出")
  617. {
  618. //收入
  619. this.txtTotalRevenue.Text = "0";
  620. //营业收入
  621. this.txtOperatingIncome.Text = "0";
  622. //总支出
  623. this.txtTotalExpenditure.Text = this.FinancialExpensesSum().ToString();
  624. //净收入
  625. this.txtNetIncome.Text = (Convert.ToDecimal(this.txtTotalRevenue.Text) - Convert.ToDecimal(this.txtTotalExpenditure.Text)).ToString();
  626. }
  627. else if (this.cmbProjectSearch.Text == "押金")
  628. {
  629. //收入
  630. this.txtTotalRevenue.Text = "0";
  631. //营业收入
  632. this.txtOperatingIncome.Text = "0";
  633. //总支出
  634. this.txtTotalExpenditure.Text = "0";
  635. //净收入
  636. this.txtNetIncome.Text = "0";
  637. }
  638. //订单前期
  639. this.txtPreliminaryResults.Text = OrderEarly().ToString();
  640. //订单后期
  641. this.txtLateResults.Text = OrderLate().ToString();
  642. }
  643. #endregion
  644. /// <summary>
  645. /// 项目查询
  646. /// </summary>
  647. /// <param name="sender"></param>
  648. /// <param name="e"></param>
  649. protected override void cmbProjectSearch_SelectedValueChanged(object sender, EventArgs e)
  650. {
  651. try
  652. {
  653. this.CtvTsorder_Name.Text = "";
  654. if (this.cmbProjectSearch.Text == "全部")
  655. { this.CtvTsorder_Name.Visible = false; }
  656. else if (this.cmbProjectSearch.Text == "订单前期收入")
  657. {
  658. this.CtvTsorder_Name.Visible = true;
  659. this.CtvTsorder_Name.TreeView.Nodes.Clear();
  660. this.CtvTsorder_Name.Nodes.Add("全部");
  661. this.CtvTsorder_Name.Nodes.Add("预约收款");
  662. this.CtvTsorder_Name.Nodes.Add("预约补款");
  663. this.CtvTsorder_Name.Nodes.Add("全款");
  664. }
  665. else if (this.cmbProjectSearch.Text == "订单后期收入")
  666. { this.CmbBindOrderLateRevenue(); }
  667. else if (this.cmbProjectSearch.Text == "其它消费收入")
  668. { this.CmbBindOrderLateRevenue(); }
  669. else if (this.cmbProjectSearch.Text == "其它收入")
  670. { this.CtvTsorder_Name.Visible = false; }
  671. else if (this.cmbProjectSearch.Text == "会员充值收入")
  672. { this.CtvTsorder_Name.Visible = false; }
  673. else if (this.cmbProjectSearch.Text == "服务卡消费收入")
  674. { this.CtvTsorder_Name.Visible = false; }
  675. else if (this.cmbProjectSearch.Text == "礼服租售收入")
  676. {
  677. this.CtvTsorder_Name.Visible = true;
  678. this.CtvTsorder_Name.TreeView.Nodes.Clear();
  679. this.CtvTsorder_Name.Nodes.Add("全部");
  680. this.CtvTsorder_Name.Nodes.Add("礼服出租");
  681. this.CtvTsorder_Name.Nodes.Add("礼服出售");
  682. }
  683. else if (this.cmbProjectSearch.Text == "店面支出")
  684. { this.CmbBindCashExpenditure(); }
  685. else if (this.cmbProjectSearch.Text == "财务支出")
  686. {
  687. this.CtvTsorder_Name.Visible = true;
  688. this.CtvTsorder_Name.TreeView.Nodes.Clear();
  689. DataTable tbl = orbll.GetView_Custom("tb_ErpSystemCategory", StrWhere: "", ShowColumnName: "ID,Sc_ClassCode,Sc_ClassName,Sc_ClassParentID", filedOrder: "ID desc").Tables[0];
  690. tbl.PrimaryKey = new DataColumn[] { tbl.Columns["Sc_ClassCode"] };
  691. DataRow dtRow = tbl.Rows.Find("BFAGBGBAEJBACEEHJ");
  692. if (dtRow != null)
  693. {
  694. DataRow[] dtRow1 = tbl.Select("Sc_ClassParentID='" + dtRow["ID"].ToString().Trim() + "'");
  695. TreeNode root = null;
  696. for (int i = 0; i < dtRow1.Length; i++)
  697. {
  698. root = new TreeNode();
  699. if (i == 0)
  700. {
  701. root = new TreeNode("全部");
  702. this.CtvTsorder_Name.TreeView.Nodes.Add(root);
  703. }
  704. root = new TreeNode(dtRow1[i]["Sc_ClassName"].ToString());
  705. root.Tag = dtRow1[i]["Sc_ClassCode"].ToString();
  706. this.CreateTreeViewShop(root.Nodes, dtRow1[i]["ID"].ToString(), tbl);
  707. this.CtvTsorder_Name.TreeView.Nodes.Add(root);
  708. }
  709. }
  710. }
  711. else if (this.cmbProjectSearch.Text == "押金")
  712. { this.CtvTsorder_Name.Visible = false; }
  713. //获取文本框金额
  714. this.BindTotal();
  715. }
  716. catch (Exception ex)
  717. { MessageBoxCustom.Show(ex.Message); }
  718. }
  719. /// <summary>
  720. /// 项目名称
  721. /// </summary>
  722. /// <param name="sender"></param>
  723. /// <param name="e"></param>
  724. protected override void CtvTsorder_Name_ComboBoxTreeViewEx_TextChanged(object sender, TreeViewEventArgs e)
  725. { this.BindTotal(); }
  726. /// <summary>
  727. /// 选择支付方式
  728. /// </summary>
  729. /// <param name="sender"></param>
  730. /// <param name="e"></param>
  731. protected override void cmbPay_PaymentMethod_ComboBoxTreeViewEx_TextChanged(object sender, TreeViewEventArgs e)
  732. { this.BindTotal(); }
  733. /// <summary>
  734. /// 查询
  735. /// </summary>
  736. /// <param name="sender"></param>
  737. /// <param name="e"></param>
  738. void btnQuery_Click(object sender, EventArgs e)
  739. {
  740. this.GetTodayMumberOrders();
  741. this.BindTotal();
  742. this.Bind();
  743. }
  744. /// <summary>
  745. /// 导出
  746. /// </summary>
  747. /// <param name="sender"></param>
  748. /// <param name="e"></param>
  749. protected override void btnExPort_Click(object sender, EventArgs e)
  750. { this.dgvMonth.ExportDataTable(); }
  751. /// <summary>
  752. /// 关闭
  753. /// </summary>
  754. /// <param name="sender"></param>
  755. /// <param name="e"></param>
  756. protected override void btnClose_Click(object sender, EventArgs e)
  757. { this.Close(); }
  758. /// <summary>
  759. /// 查询明细
  760. /// </summary>
  761. /// <param name="sender"></param>
  762. /// <param name="e"></param>
  763. protected override void dgvMonth_DoubleClick(object sender, EventArgs e)
  764. {
  765. try
  766. {
  767. if (this.dgvMonth.SelectedRows.Count == 0)
  768. { MessageBoxCustom.Show("请选择你要修改的数据!"); return; }
  769. LYFZ.Software.MainBusiness.StatisticalInquiry.FrmDayFinance frm = new FrmDayFinance();
  770. frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
  771. frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
  772. frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
  773. frm.DateTimeDay = this.dgvMonth.CurrentRow.Cells["DayNumber"].Value.ToString();
  774. frm.Show();
  775. }
  776. catch (Exception ex)
  777. { MessageBoxCustom.Show(ex.Message); }
  778. }
  779. /// <summary>
  780. /// 打印
  781. /// </summary>
  782. /// <param name="sender"></param>
  783. /// <param name="e"></param>
  784. protected override void btnPrint_Click(object sender, EventArgs e)
  785. {
  786. try
  787. {
  788. string StrDateWeek = this.dtpStart.DateValue + " — " + this.dtpEnd.DateValue;// Convert.ToDateTime(this.numYear.Value + "-" + this.numMonth.Value).ToString("yyyy年MM月");
  789. object StrText = "总收入:" + this.txtTotalRevenue.Text.Trim() + " 营业收入:" + this.txtOperatingIncome.Text.Trim() + " 总支出:" + this.txtTotalExpenditure.Text.Trim();
  790. StrText += "\r\n净收入:" + this.txtNetIncome.Text.Trim() + " 前期业绩:" + this.txtPreliminaryResults.Text.Trim() + " 后期业绩:" + this.txtLateResults.Text.Trim();
  791. StrText += "\r\n" + this.lblCount.Text.Trim();
  792. Hashtable htData = new Hashtable();
  793. htData["dgvData"] = this.dgvMonth;
  794. htData["StrText"] = StrText;
  795. htData["StrDateWeek"] = StrDateWeek;
  796. LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintFixedFormat(EnumPublic.PrintTypeEnum.财务报表月, htData);
  797. }
  798. catch (Exception ex)
  799. { MessageBoxCustom.Show(ex.Message); }
  800. }
  801. /// <summary>
  802. /// 查看详情
  803. /// </summary>
  804. /// <param name="sender"></param>
  805. /// <param name="e"></param>
  806. protected override void btnSeeDetails_Click(object sender, EventArgs e)
  807. {
  808. LYFZ.Software.MainBusiness.StatisticalInquiry.MonthFinance.FrmMonthFinanceSeeDetails frm = new MonthFinance.FrmMonthFinanceSeeDetails();
  809. frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
  810. frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
  811. frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
  812. frm.StrDateStart = this.dtpStart.DateValue;
  813. frm.StrDateEnd = this.dtpEnd.DateValue;
  814. frm.ShowDialog();
  815. }
  816. }
  817. }