コード例 #1
0
        private void btnExcel_Click(object sender, System.EventArgs e)
        {
            //导出EXCEL
            //体
            DataTable dtMember  = GetData(txtCompanyName.Text, ddlDept.SelectedValue, this.txtBeginDate.Text, this.txtEndDate.Text, ddlState.SelectedValue, txtLicenseTag.Text, txtCardID.Text);
            string    strMember = this.ExportTable(dtMember);
            //Session["QUERY"] = dtMember;
            //头
            string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strCaption += "<tr><td align=center colspan=10>" + CommonStatic.EnterpriseFullName() + "</td></tr>";
            strCaption += "<tr><td align=center colspan=10>会员清单</td></tr>";
            strCaption += "<tr><td align=center colspan=10>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>";
            strCaption += "</table>";
            //Session["ExcelCaption"] = strCaption;
            //脚
            string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strBottom += "<tr>";
            strBottom += "<td align=center colspan=3>部门主管:</td>";
            strBottom += "<td align=center colspan=3>审核:</td>";
            strBottom += "<td align=center colspan=4>制表:</td></tr>";
            strBottom += "</table>";
            //Session["ExcelBottom"] = strBottom;
            this.ExportToXls(this, "会员清单", strCaption + strMember + strBottom);
        }
コード例 #2
0
        private void btnExcel_Click(object sender, System.EventArgs e)
        {
            //导出EXCEL
            //体
            DataTable dtBillOfMove = this.GetData(this.ddlDeliveryCompany.SelectedValue, this.ddlProvideCompany.SelectedValue, this.txtBeginDate.Text, this.txtEndDate.Text);

            dtBillOfMove.Columns.Remove("修改");
            string strBillOfMove = this.ExportTable(dtBillOfMove);
            //Session["QUERY"] = dtBillOfMove;

            //头
            string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strCaption += "<tr><td align=center colspan=13>" + CommonStatic.EnterpriseFullName() + "</td></tr>";
            strCaption += "<tr><td align=center colspan=13>储备库柴油调拨明细报表</td></tr>";
            strCaption += "<tr><td align=left colspan=13>填报单位:</td></tr>";
            strCaption += "</table>";
            //Session["ExcelCaption"] = strCaption;
            //脚
            string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strBottom += "<tr>";
            strBottom += "<td align=center colspan=3>单位主管:</td>";
            strBottom += "<td></td>";
            strBottom += "<td colspan=3>业务主管:</td>";
            strBottom += "<td align=center colspan=3>审核:</td>";
            strBottom += "<td colspan=3>制表:</td></tr>";

            strBottom += "<tr><td colspan=13 align=right>编制日期:" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr></table>";
            //Session["ExcelBottom"] = strBottom;
            this.ExportToXls(this, "储备库柴油调拨明细报表", strCaption + strBillOfMove + strBottom);
        }
コード例 #3
0
        private void btnExcel_Click(object sender, System.EventArgs e)
        {
            //导出EXCEL
            //体
            //Session["QUERY"] = dtConsItem;
            DataTable dtConsItem  = GetData(this.ddlDept.SelectedValue, this.txtBeginDate.Text, this.txtEndDate.Text);
            string    strConsItem = this.ExportTable(dtConsItem);
            //头
            string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strCaption += "<tr><td align=center colspan=14>" + CommonStatic.EnterpriseFullName() + "</td></tr>";
            strCaption += "<tr><td align=center colspan=14>" + ddlDept.SelectedItem.Text + "零售油销售汇总表</td></tr>";
            strCaption += "<tr><td align=center colspan=14>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>";
            strCaption += "<tr><td align=left colspan=3></td><td colspan=3></td><td align=center>金额单位:元</td></tr>";
            strCaption += "</table>";
            //Session["ExcelCaption"] = strCaption;
            //脚
            string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strBottom += "<tr><td></td>";
            strBottom += "<td align=center>部门主管:</td>";
            strBottom += "<td></td><td></td>";
            strBottom += "<td align=center>审核:</td>";
            strBottom += "<td></td><td>制表:</td></tr>";
            strBottom += "<tr><td colspan=14>本表一式三份,物资公司财务一份,物资公司业务一份,各电站业务留存一份。</td></tr></table>";
            //Session["ExcelBottom"] = strBottom;
            this.ExportToXls(this, ddlDept.SelectedItem.Text + "零售油销售汇总表", strCaption + strConsItem + strBottom);
        }
コード例 #4
0
        private void btnExcel_Click(object sender, System.EventArgs e)
        {
            //导出EXCEL
            //体
            string    strDeliveryCompanyFact = "";
            string    strContractNoFact      = "";
            DataTable dtBillOfMaterials      = GetData(this.ddlDept.SelectedValue, this.ddlDept.SelectedItem.Text,
                                                       this.txtBeginDate.Text, this.txtEndDate.Text, this.txtDeliveryCompany.Text,
                                                       this.txtContractNo.Text, ref strDeliveryCompanyFact, ref strContractNoFact);

            dtBillOfMaterials.Columns.Remove("修改");
            string strBillOfMaterials = this.ExportTable(dtBillOfMaterials);
            //Session["QUERY"] = dtBillOfMaterials;
            //头
            string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strCaption += "<tr><td align=center colspan=11>" + CommonStatic.EnterpriseFullName() + "</td></tr>";
            strCaption += "<tr><td align=center colspan=11>" + ddlDept.SelectedItem.Text + "专供柴油销售明细表</td></tr>";
            strCaption += "<tr><td align=center colspan=11>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>";
            strCaption += "<tr><td align=left colspan=4>" + "领用单位:" + strDeliveryCompanyFact + "</td><td colspan=4>合同编号:" + strContractNoFact + "</td><td align=center colspan=2>金额单位:元</td><td></td></tr>";
            strCaption += "</table>";
            //Session["ExcelCaption"] = strCaption;
            //脚
            string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strBottom += "<tr><td></td>";
            strBottom += "<td align=center colspan=2>部门主管:</td>";
            strBottom += "<td></td><td></td>";
            strBottom += "<td align=center colspan=2>审核:</td>";
            strBottom += "<td></td><td colspan=2>制表:</td><td></td></tr>";
            strBottom += "<tr><td colspan=11>本表一式四份,物资公司财务一份(附领料单),物资公司业务一份,一份与供货发票一并转领用单位(附领料单),各电站业务留存一份(附领料单)。</td></tr></table>";
            //Session["ExcelBottom"] = strBottom;
            this.ExportToXls(this, ddlDept.SelectedItem.Text + "专供柴油销售明细表", strCaption + strBillOfMaterials + strBottom);
        }
コード例 #5
0
        public static void FillTree(TreeView tv, bool haveOper)
        {
            DataTable dtOper = ReportQueryFacade.CommonQuery("select * from tbOper order by cnvcOpername");            //"OperFacade.GetAllOper();
            DataTable dtDept = ReportQueryFacade.CommonQuery("select * from tbDept order by cnvcDeptName");            //OperFacade.GetAllDept();

            //最高级部门
            TreeNode tnTop = new TreeNode();

            tnTop.ID   = "dept_00";
            tnTop.Type = "dept";
            tnTop.Text = CommonStatic.EnterpriseFullName();

            if (haveOper)
            {
                DataRow[] drOpers = dtOper.Select("cnvcDeptID=00");
                foreach (DataRow drOper in drOpers)
                {
                    Oper     oper   = new Oper(drOper);
                    TreeNode tnOper = OperNode(oper);
                    tnTop.Nodes.Add(tnOper);
                }
            }

            //一级部门
            DataRow[] drDepts = dtDept.Select("cnvcParentDeptID=00");
            foreach (DataRow drDept in drDepts)
            {
                Dept     dept   = new Dept(drDept);
                TreeNode tnDept = DeptNode(dept);
                FillNode(dtDept, dtOper, tnDept, dept.cnvcDeptID, haveOper);
                tnTop.Nodes.Add(tnDept);
            }
            tv.Nodes.Add(tnTop);
        }
コード例 #6
0
        private void btnExcel_Click(object sender, System.EventArgs e)
        {
            string strDate = "";

            if (this.txtBeginDate.Text == "")
            {
                strDate = DateTime.Now.ToString("yyyy-MM-dd");
            }
            else
            {
                strDate = this.txtBeginDate.Text;
            }
            //导出EXCEL
            DataTable dtGoodsType  = GetData(this.ddlDept.SelectedValue, this.ddlDept.SelectedItem.Text, strDate);
            string    strGoodsType = this.ExportTable(dtGoodsType);
            //体
            //Session["QUERY"] = dtGoodsType;
            //头
            string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strCaption += "<tr><td align=center colspan=9>" + CommonStatic.EnterpriseFullName() + "</td></tr>";
            strCaption += "<tr><td align=center colspan=9>油料收、支、存动态月报表</td></tr>";
            strCaption += "<tr><td align=left colspan=4>填报单位:" + this.ddlDept.SelectedItem.Text + "</td><td align=left colspan=5>填报日期:" + strDate + "";
            strCaption += "</table>";
            //Session["ExcelCaption"] = strCaption;
            //脚
            string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strBottom += "<tr ><td align=left colspan=3>单位主管:</td>";
            strBottom += "<td align=left colspan=3>审核:</td>";
            strBottom += "<td align=left colspan=3>制表:</td></tr>";
            strBottom += "</table>";
            //Session["ExcelBottom"] = strBottom;
            this.ExportToXls(this, "油料收、支、存动态月报表", strCaption + strGoodsType + strBottom);
        }
コード例 #7
0
 private void btnExcel_Click(object sender, System.EventArgs e)
 {
     if (this.txtflag.Text == "FillFee")
     {
         DataTable dtFillFee = GetFillFee();
         dtFillFee.Columns.Remove("cnnSerial");
         dtFillFee.Columns.Remove("cnvcCompanyID");
         dtFillFee.Columns["cnvcCompanyName"].ColumnName = "单位名称";
         dtFillFee.Columns.Remove("cnvcAcctID");
         dtFillFee.Columns["cnnFillFee"].ColumnName   = "充值金额";
         dtFillFee.Columns["cnvcOperName"].ColumnName = "操作员";
         dtFillFee.Columns["cndOperDate"].ColumnName  = "操作时间";
         dtFillFee.Columns.Remove("cnvcDeptID");
         dtFillFee.Columns["cnvcDeptName"].ColumnName = "指定加油站";
         //体
         //Session["QUERY"] = dtFillFee;
         string strFillFee = this.ExportTable(dtFillFee);
         //头
         string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>";
         strCaption += "<tr><td align=center colspan=5>" + CommonStatic.EnterpriseFullName() + "</td></tr>";
         strCaption += "<tr><td align=center colspan=5>充值明细表</td></tr>";
         strCaption += "<tr><td align=center colspan=5>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>";
         strCaption += "</table>";
         //Session["ExcelCaption"] = strCaption;
         this.ExportToXls(this, "充值明细表", strCaption + strFillFee);
     }
     else
     {
         DataTable dtCompany = GetCompany();
         dtCompany.Columns.Remove("cnvcCompanyID");
         dtCompany.Columns["cnvcCompanyName"].ColumnName = "单位名称";
         dtCompany.Columns.Remove("cnvcAcctID");
         dtCompany.Columns["cnnPrepayFee"].ColumnName = "余额";
         dtCompany.Columns.Remove("cnvcDeptID");
         dtCompany.Columns["cnvcDeptName"].ColumnName = "指定加油站";
         dtCompany.Columns.Remove("cnnFillFee");
         dtCompany.Columns["cnnFillFeeSum"].ColumnName = "充值合计";
         //体
         //Session["QUERY"] = dtCompany;
         string strCompany = this.ExportTable(dtCompany);
         //头
         string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>";
         strCaption += "<tr><td align=center colspan=4>" + CommonStatic.EnterpriseFullName() + "</td></tr>";
         strCaption += "<tr><td align=center colspan=4>加油卡单位余额明细表</td></tr>";
         strCaption += "<tr><td align=center colspan=4>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>";
         strCaption += "</table>";
         //Session["ExcelCaption"] = strCaption;
         this.ExportToXls(this, "加油卡单位余额明细表", strCaption + strCompany);
     }
 }
コード例 #8
0
        private void btnExcel_Click(object sender, System.EventArgs e)
        {
            //导出EXCEL
            //体
            DataTable dtConsItem  = GetData(this.ddlDept.SelectedValue, this.txtBeginDate.Text, this.txtEndDate.Text, this.txtOperName.Text, this.ddlOperType.SelectedValue);
            string    strConsItem = this.ExportTable(dtConsItem);
            //Session["QUERY"] = dtConsItem;
            //头
            string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strCaption += "<tr><td align=center colspan=10>" + CommonStatic.EnterpriseFullName() + "</td></tr>";
            strCaption += "<tr><td align=center colspan=10>" + ddlDept.SelectedItem.Text + "库存日志明细表</td></tr>";
            strCaption += "<tr><td align=center colspan=10>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>";
            strCaption += "</table>";
            //Session["ExcelCaption"] = strCaption;
            this.ExportToXls(this, ddlDept.SelectedItem.Text + "库存日志明细表", strCaption + strConsItem);
        }
コード例 #9
0
        void LoadDept()
        {
            Dept getDept = new Dept();

            getDept.cnvcDeptID = this.txtDeptID.Text;
            Dept dept = DeptFacade.GetDept(getDept);

            if (dept != null)
            {
                hidParentID.Value   = dept.cnvcParentDeptID;
                txtDeptName.Text    = dept.cnvcDeptName;
                chkValidate.Checked = dept.cnbValidate;
            }
            if (this.txtDeptID.Text == "0")
            {
                hidParentID.Value = "0";
                txtDeptName.Text  = CommonStatic.EnterpriseFullName();
            }
        }
コード例 #10
0
        private void btnExcel_Click(object sender, System.EventArgs e)
        {
            //导出EXCEL
            //体
            string strGoodsName = ddlGoodsName.SelectedItem.Text;

            if (strGoodsName == "所有")
            {
                strGoodsName = "%";
            }
            string    strDeliveryCompanyFact = "";
            string    strProvideCompanyFact  = "";
            DataTable dtBillOfValidate       = GetData(this.ddlDeliveryCompany.SelectedValue, this.ddlProvideCompany.SelectedValue,
                                                       this.txtDeliveryBeginDate.Text, this.txtDeliveryEndDate.Text, this.txtProvideBeginDate.Text, this.txtProvideEndDate.Text,
                                                       ddlGoodsType.SelectedValue, strGoodsName, ref strDeliveryCompanyFact, ref strProvideCompanyFact, txtBillNo.Text);

            dtBillOfValidate.Columns.Remove("修改");
            //Session["QUERY"] = dtBillOfValidate;
            string strBillOfValidate = this.ExportTable(dtBillOfValidate);
            //头
            string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strCaption += "<tr><td align=center colspan=15>" + CommonStatic.EnterpriseFullName() + "</td></tr>";
            strCaption += "<tr><td align=center colspan=15>油料验收明细</td></tr>";
            strCaption += "<tr><td align=left colspan=5>" + "供油单位:" + strProvideCompanyFact + "</td><td></td><td colspan=5>收油单位:"
                          + strDeliveryCompanyFact + "</td><td></td><td colspan=2></td><td align=center>单位:kg</td></tr>";
            strCaption += "</table>";
            //Session["ExcelCaption"] = strCaption;
            //脚
            string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>";

            strBottom += "<tr><td colspan=15 rospan=4>公里运输损耗的计算:公路运输定额损耗按《中石化成品油计量管理标准》规定执行,即GB11085-89之规定:50公里以下损耗为0.01%;运距每增加50公里,损耗增加0.01;不足50公里按50公里计算。甲方按乙方起运油库至糯扎渡中心油库运距,承担定额运输损耗;超出定额损耗部分由乙方承运人与甲方收货人双方签字确认,按思茅市翠云区中石化加油站挂牌零售价由甲方从乙方结算运费中扣抵。</td></tr></table>";
            //			strBottom += "<td align=center>部门主管:</td>";
            //			strBottom += "<td></td><td></td>";
            //			strBottom += "<td align=center>审核:</td>";
            //			strBottom += "<td></td><td>制表:</td><td></td></tr>";
            //			strBottom += "<tr><td colspan=8>本表一式四份,物资公司财务一份(附领料单),物资公司业务一份,一份与供货发票一并转领用单位(附领料单),各电站业务留存一份(附领料单)。</td></tr></table>";
            //Session["ExcelBottom"] = strBottom;
            this.ExportToXls(this, "油料验收明细", strCaption + strBillOfValidate + strBottom);
        }