Exemplo n.º 1
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="list"></param>
        /// <param name="i"></param>
        /// <param name="j"></param>
        private void init(List <Customs.Entity.Store_in_listInfo> list, int i, int j)
        {
            #region 给table赋值
            DevExpress.XtraReports.UI.XRTableCell seq = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cseq" + i, false);
            seq.Text = list[j].G_no.ToString();
            DevExpress.XtraReports.UI.XRTableCell cCode = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cCode" + i, false);
            cCode.Text = list[j].Code_t;
            //货物名称和规格
            DevExpress.XtraReports.UI.XRTableCell cName = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cName" + i, false);
            cName.Text = list[j].Mg_name + "\n" + list[j].Mg_spec + "\n" + list[j].Pkgs + "件";
            //数量
            string temp = PublicMethod.RemoveZero(list[j].Qty_2.ToString()) == "0" ? "" : PublicMethod.RemoveZero(list[j].Qty_2.ToString());
            DevExpress.XtraReports.UI.XRTableCell cNum = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cNum" + i, false);
            //cNum.Text = PublicMethod.RemoveZero(list[j].G_qty.ToString())+"\n"+PublicMethod.RemoveZero(list[j].Qty_1.ToString())+"\n"+temp;
            cNum.Text = PublicMethod.RemoveZero(list[j].Qty_1.ToString()) + "\n" + temp + "\n" + PublicMethod.RemoveZero(list[j].G_qty.ToString());
            //单位
            DevExpress.XtraReports.UI.XRTableCell cUnit = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cUnit" + i, false);
            //cUnit.Text =PublicMethod.GetHashValue(ht,list[j].G_unit).ToString() + "\n" + PublicMethod.GetHashValue(ht,list[j].Unit_code1).ToString() + "\n"+PublicMethod.GetHashValue(ht,list[j].Unit_code2).ToString();//list[j].G_unit;
            cUnit.Text = CommonReport.GetHashValue(ht, list[j].Unit_code1).ToString() + "\n" + CommonReport.GetHashValue(ht, list[j].Unit_code2).ToString() + "\n" + CommonReport.GetHashValue(ht, list[j].G_unit).ToString();//list[j].G_unit;

            DevExpress.XtraReports.UI.XRTableCell cWeight = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cWeight" + i, false);
            cWeight.Text = list[j].Gross + "\n" + list[j].Net;
            //币值
            DevExpress.XtraReports.UI.XRTableCell cCoin = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cCoin" + i, false);
            cCoin.Text = CommonReport.GetCode("118", list[j].Curr_code.ToString(), true);

            DevExpress.XtraReports.UI.XRTableCell cPrice = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cPrice" + i, false);
            cPrice.Text = list[j].Unit_price.ToString();

            DevExpress.XtraReports.UI.XRTableCell cTotal = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cTotal" + i, false);
            cTotal.Text = list[j].Trade_ttl.ToString();
            #endregion
        }
Exemplo n.º 2
0
        /// <summary>
        /// 初始化明细
        /// </summary>
        private void init(List <Customs.Entity.Store_out_listInfo> List, int i, int j)
        {
            //初始化每列的数据
            DevExpress.XtraReports.UI.XRTableCell COldBill_id = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("COldBill_id" + i, false);
            COldBill_id.Text = List[j].Cust_in_bill_id;

            DevExpress.XtraReports.UI.XRTableCell cInseq = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cInseq" + i, false);
            cInseq.Text = List[j].In_g_no.ToString();

            DevExpress.XtraReports.UI.XRTableCell cOutseq = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cOutseq" + i, false);
            cOutseq.Text = List[j].G_no.ToString();

            DevExpress.XtraReports.UI.XRTableCell cPlace = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cPlace" + i, false);
            cPlace.Text = List[j].Loc;

            DevExpress.XtraReports.UI.XRTableCell cCode = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cCode" + i, false);
            cCode.Text = List[j].Code_t;

            DevExpress.XtraReports.UI.XRTableCell cName = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cName" + i, false);
            cName.Text = List[j].Mg_name + "\n" + List[i - 1].Mg_spec + "\n" + List[i - 1].Pkgs + "件";

            DevExpress.XtraReports.UI.XRTableCell cNum = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cNum" + i, false);
            string temp = PublicMethod.RemoveZero(List[j].Qty_2.ToString()) == "0" ? "" : PublicMethod.RemoveZero(List[j].Qty_2.ToString());

            //cNum.Text = PublicMethod.RemoveZero(List[j].G_qty.ToString()) + "\n" + PublicMethod.RemoveZero(List[j].Qty_1.ToString()) + "\n" + temp;
            cNum.Text = PublicMethod.RemoveZero(List[j].Qty_1.ToString()) + "\n" + temp + "\n" + PublicMethod.RemoveZero(List[j].G_qty.ToString());

            DevExpress.XtraReports.UI.XRTableCell cUnit = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cUnit" + i, false);
            //cUnit.Text =PublicMethod.GetHashValue(ht, List[j].G_unit.ToString()) +"\n"+ PublicMethod.GetHashValue(ht,List[j].Unit_code1).ToString() + "\n" + PublicMethod.GetHashValue(ht,List[j].Unit_code2).ToString();
            cUnit.Text = CommonReport.GetHashValue(ht, List[j].Unit_code1).ToString() + "\n" + CommonReport.GetHashValue(ht, List[j].Unit_code2).ToString() + "\n" + CommonReport.GetHashValue(ht, List[j].G_unit).ToString();

            DevExpress.XtraReports.UI.XRTableCell cWeight = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cWeight" + i, false);
            cWeight.Text = List[j].Gross + "\n" + List[i - 1].Net;

            DevExpress.XtraReports.UI.XRTableCell cCoin = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cCoin" + i, false);
            cCoin.Text = CommonReport.GetCode("118", List[j].Curr_code, true);;

            DevExpress.XtraReports.UI.XRTableCell cPrice = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cPrice" + i, false);
            cPrice.Text = List[j].Unit_price.ToString();

            DevExpress.XtraReports.UI.XRTableCell cTotal = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cTotal" + i, false);
            cTotal.Text = List[j].Trade_ttl.ToString();
        }
Exemplo n.º 3
0
        //初始化出口监管仓货物入仓清单
        public Report_ExSup(Customs.Entity.Store_in_headInfo CurInHead, List <Customs.Entity.Store_in_listInfo> list)
        {
            //先初始化界面
            InitializeComponent();
            //初始化报表
            try
            {
                //初始化表头部分
                //仓库编号
                labWareNO.Text     = CurInHead.Cust_bill_id;
                labCustomCode.Text = CurInHead.Bill_id;
                lbCnsNo.Text       = CurInHead.Cns_no;
                tbWareName.Text    = "深国际华南物流监管仓";
                tbreferdoc.Text    = CurInHead.Refer_doc;
                //发货单位
                tbdeliverUnit.Text = CommonReport.GetCompanyName(CurInHead.Rs_code);
                tbSumWeight.Text   = "毛重:" + CurInHead.Gross_wt.ToString() + "\n" + "净重:" + CurInHead.Net_wt.ToString();//CurInHead.Gross_wt.ToString();

                lbPkgs.Text       = "共 " + CurInHead.Pkgs_num + " 件";
                tbtotalValue.Text = CurInHead.All_value.ToString();
                tbPlace.Text      = CurInHead.Place;
                //国别
                tbOutCountry.Text = list != null?CommonReport.GetCode("102", list[0].Orign_coun, false) : "";   //WareCommon.GetCode("102", CurInHead.Trade_coun, false);

                tbtaxRebate.Text  = CurInHead.Tax_flag.Trim() == "1" ? "是" : "否";
                tbTradetype.Text  = httrade_way.Contains(CurInHead.Trade_mode) ? httrade_way[CurInHead.Trade_mode].ToString() : "";
                tbInWaretype.Text = htIn_type.Contains(CurInHead.In_type) ? htIn_type[CurInHead.In_type].ToString() : "";
                //目的海关
                labCustom.Text = CurInHead.Ie_portName;
                //报关员
                //labName.Text = "报关员";
                //货主
                //lab.Text = "龙卓公司";
                //仓库员
                //labAdmin.Text = "胡藩";

                BarCode.Text  = CurInHead.Bill_id;
                tbremark.Text = CurInHead.Remark;
                labDate.Text  = CurInHead.Ie_date.ToString("yyyy-MM-dd") != "1900-01-01" ? CurInHead.Ie_date.ToString("yyyy-MM-dd") : "";
                //txtPkgs.Text = "200件";
                if (list.Count <= 5)
                {
                    for (int i = 1; i <= list.Count; i++)
                    {
                        #region 给table赋值
                        DevExpress.XtraReports.UI.XRTableCell seq = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cseq" + i, false);
                        seq.Text = list[i - 1].G_no.ToString();
                        DevExpress.XtraReports.UI.XRTableCell cCode = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cCode" + i, false);
                        cCode.Text = list[i - 1].Code_t;
                        //货物名称和规格
                        DevExpress.XtraReports.UI.XRTableCell cName = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cName" + i, false);
                        cName.Text = list[i - 1].Mg_name + "\r\n" + list[i - 1].Mg_spec + "\n" + list[i - 1].Pkgs.ToString() + "件";
                        //数量
                        string temp = PublicMethod.RemoveZero(list[i - 1].Qty_2.ToString()) == "0" ? "" : PublicMethod.RemoveZero(list[i - 1].Qty_2.ToString());
                        DevExpress.XtraReports.UI.XRTableCell cNum = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cNum" + i, false);
                        //cNum.Text = PublicMethod.RemoveZero(list[i - 1].G_qty.ToString()) + "\n" + PublicMethod.RemoveZero(list[i - 1].Qty_1.ToString()) + "\n" + temp;
                        cNum.Text = PublicMethod.RemoveZero(list[i - 1].Qty_1.ToString()) + "\n" + temp + "\n" + PublicMethod.RemoveZero(list[i - 1].G_qty.ToString()); //list[i - 1].G_qty.ToString();
                        //单位
                        DevExpress.XtraReports.UI.XRTableCell cUnit = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cUnit" + i, false);
                        //cUnit.Text = PublicMethod.GetHashValue(ht,list[i - 1].G_unit).ToString() + "\n" + PublicMethod.GetHashValue(ht,list[i - 1].Unit_code1).ToString() + "\n" + PublicMethod.GetHashValue(ht,list[i - 1].Unit_code2).ToString();
                        cUnit.Text = CommonReport.GetHashValue(ht, list[i - 1].Unit_code1).ToString() + "\n" + CommonReport.GetHashValue(ht, list[i - 1].Unit_code2).ToString() + "\n" + CommonReport.GetHashValue(ht, list[i - 1].G_unit).ToString(); //ht.Contains(list[i - 1].G_unit) ? ht[list[i - 1].G_unit].ToString() : "";//list[i - 1].G_unit;

                        DevExpress.XtraReports.UI.XRTableCell cWeight = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cWeight" + i, false);
                        cWeight.Text = list[i - 1].Gross + "\r\n" + list[i - 1].Net;
                        //币值
                        DevExpress.XtraReports.UI.XRTableCell cCoin = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cCoin" + i, false);
                        cCoin.Text = CommonReport.GetCode("118", list[i - 1].Curr_code.ToString(), true);

                        DevExpress.XtraReports.UI.XRTableCell cPrice = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cPrice" + i, false);
                        cPrice.Text = list[i - 1].Unit_price.ToString();

                        DevExpress.XtraReports.UI.XRTableCell cTotal = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cTotal" + i, false);
                        cTotal.Text = list[i - 1].Trade_ttl.ToString();
                        #endregion
                    }
                }
                if (list.Count > 5)
                {
                    for (int i = 1; i <= 5; i++)
                    {
                        #region 给table赋值
                        DevExpress.XtraReports.UI.XRTableCell seq = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cseq" + i, false);
                        seq.Text = list[i - 1].G_no.ToString();
                        DevExpress.XtraReports.UI.XRTableCell cCode = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cCode" + i, false);
                        cCode.Text = list[i - 1].Code_t;
                        //货物名称和规格
                        DevExpress.XtraReports.UI.XRTableCell cName = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cName" + i, false);
                        cName.Text = list[i - 1].Mg_name + "\r\n" + list[i - 1].Mg_spec + "\r\n" + list[i - 1].Pkgs.ToString() + "件";
                        //数量
                        string temp = PublicMethod.RemoveZero(list[i - 1].Qty_2.ToString()) == "0"?"":PublicMethod.RemoveZero(list[i - 1].Qty_2.ToString());
                        DevExpress.XtraReports.UI.XRTableCell cNum = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cNum" + i, false);
                        //cNum.Text = PublicMethod.RemoveZero(list[i - 1].G_qty.ToString()) + "\n" + PublicMethod.RemoveZero(list[i - 1].Qty_1.ToString()) + "\n" + temp; //list[i - 1].G_qty.ToString();
                        cNum.Text = PublicMethod.RemoveZero(list[i - 1].Qty_1.ToString()) + "\n" + temp + "\n" + PublicMethod.RemoveZero(list[i - 1].G_qty.ToString()); //list[i - 1].G_qty.ToString();
                        //单位
                        DevExpress.XtraReports.UI.XRTableCell cUnit = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cUnit" + i, false);
                        //cUnit.Text = PublicMethod.GetHashValue(ht,list[i - 1].G_unit).ToString() + "\n" + PublicMethod.GetHashValue(ht,list[i - 1].Unit_code1).ToString() + "\n" + PublicMethod.GetHashValue(ht,list[i - 1].Unit_code2).ToString(); //ht.Contains(list[i - 1].G_unit) ? ht[list[i - 1].G_unit].ToString() : "";//list[i - 1].G_unit;
                        cUnit.Text = CommonReport.GetHashValue(ht, list[i - 1].Unit_code1).ToString() + "\n" + CommonReport.GetHashValue(ht, list[i - 1].Unit_code2).ToString() + "\n" + CommonReport.GetHashValue(ht, list[i - 1].G_unit).ToString(); //ht.Contains(list[i - 1].G_unit) ? ht[list[i - 1].G_unit].ToString() : "";//list[i - 1].G_unit;

                        DevExpress.XtraReports.UI.XRTableCell cWeight = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cWeight" + i, false);
                        cWeight.Text = list[i - 1].Gross + "\r\n" + list[i - 1].Net;
                        //币值
                        DevExpress.XtraReports.UI.XRTableCell cCoin = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cCoin" + i, false);
                        cCoin.Text = CommonReport.GetCode("118", list[i - 1].Curr_code.ToString(), true);

                        DevExpress.XtraReports.UI.XRTableCell cPrice = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cPrice" + i, false);
                        cPrice.Text = list[i - 1].Unit_price.ToString();

                        DevExpress.XtraReports.UI.XRTableCell cTotal = (DevExpress.XtraReports.UI.XRTableCell)Detail.FindControl("cTotal" + i, false);
                        cTotal.Text = list[i - 1].Trade_ttl.ToString();
                        #endregion
                    }
                }
            }
            catch (Exception ex)
            {
                LogManager.WriteErrorLog(ex.Message.ToString());
            }
        }
Exemplo n.º 4
0
        public Report_ckjgcc(Customs.Entity.Store_out_headInfo CurOutHead, List <Customs.Entity.Store_out_listInfo> CurOutList, string Type)
        {
            InitializeComponent();
            //Type = "保税";
            try
            {
                #region 表头项
                if (Type == "监管")
                {
                    tbWareName.Text    = "华南物流监管仓";
                    tbVar.Text         = "集装箱号";
                    tbTitle.Text       = "出 口 监 管 仓 货 物";
                    labCustomCode.Text = CurOutHead.Bill_id;
                    //labWareNO.Text = CurOutHead.Store_code;
                    //tbSum.Visible = false;
                }
                if (Type == "保税" || Type == "MCC")
                {
                    xrPictureBox1.Visible = false;
                    labCustomCode.Visible = false;
                    xrLabel3.Visible      = false;
                    tbTitle.Text          = "进 口 保 税 仓 货 物";
                    tbWareName.Text       = "华南物流保税仓";
                    tbVar.Text            = "载货清单号";
                    xrLabel2.Text         = "出仓单编号:";
                    //labWareNO.Text = CurOutHead.Bill_id;
                }
                //总的件数合计
                BarCode.Text = CurOutHead.Bill_id;

                lbJZXH.Text    = CurOutHead.Cntnr_spec;
                labWareNO.Text = CurOutHead.Cust_bill_id;
                lbCnsNo.Text   = CurOutHead.Cns_no;

                tbTotalPkgs.Text   = CurOutHead.Pkgs_num.ToString();
                tbreferdoc.Text    = CurOutHead.Refer_doc;
                tbLoadCarCode.Text = CurOutHead.Shipping_no;
                tbdeliverUnit.Text = htCustom[CurOutHead.Lease_holder] != null?htCustom[CurOutHead.Lease_holder].ToString():"";
                tbOut.Text         = CurOutHead.Ie_port;
                tbFZCode.Text      = CurOutHead.Seal_no;
                //司机本海关编号
                tbcarCcode.Text   = CurOutHead.Driver_no;
                tbOutCountry.Text = CommonReport.GetCode("102", CurOutHead.Trade_coun, false);
                tbCarNO.Text      = CurOutHead.Car_no;
                tbOutType.Text    = CurOutHead.Out_type;
                lbRemark.Text     = CurOutHead.Remark;
                if (CurOutHead.Ie_date.ToString("yyyy-MM-dd") != "1900-01-01")
                {
                    labDate.Text = CurOutHead.Ie_date.ToString("yyyy-MM-dd");
                }
                //labCustom.Text = CurOutHead.Ie_port;
                tbTotal.Text  = CurOutHead.All_value.ToString();
                tbTotalW.Text = "毛重:" + CurOutHead.Gross_wt.ToString() + "\n" + "净重:" + CurOutHead.Net_wt.ToString();
                #endregion

                #region 明细项
                if (CurOutList.Count <= 5)
                {
                    for (int i = 1; i <= CurOutList.Count; i++)
                    {
                        init(i, CurOutList);
                    }
                }
                if (CurOutList.Count > 5)
                {
                    for (int i = 1; i <= 5; i++)
                    {
                        init(i, CurOutList);
                    }
                }
                #endregion
            }
            catch (Exception)
            {
                throw;
            }
        }