示例#1
0
 private Foresight.DataAccess.Ui.DataGrid LoadRoomFeeHistoryList()
 {
     try
     {
         int        CompanyID            = 0;
         List <int> RoomIDList           = new List <int>();
         List <int> ProjectIDList        = new List <int>();
         int        FeeID                = 0;
         int        RoomFeeOrderID       = 0;
         DateTime   StartChargeTime      = DateTime.MinValue;
         DateTime   EndChargeTime        = DateTime.MinValue;
         bool       IncludIsCharged      = false;
         bool       IncludePreCharge     = false;
         bool       IncludeDepoistCharge = false;
         int        DepoistStatus        = int.MinValue;
         int        PreChargeStatus      = int.MinValue;
         long       startRowIndex        = 0;
         int        pageSize             = int.MaxValue;
         int[]      ChargeManID          = new int[] { };
         int[]      ChargeSummaryID      = new int[] { };
         int[]      ChargeTypeID         = new int[] { };
         int[]      CategoryID           = new int[] { };
         bool       IncludeFooter        = true;
         List <int> ChargeStatusIDList   = (new int[] { 1, 3, 4, 6, 7 }).ToList();
         bool       IsRoomFeeSearch      = true;
         bool       IsCuiShou            = false;
         int        ContractID           = 0;
         bool       ExcludeCuiShou       = false;
         List <int> HistoryIDList        = new List <int>();
         if (!string.IsNullOrEmpty(hdHistoryIDList.Value))
         {
             HistoryIDList = JsonConvert.DeserializeObject <List <int> >(hdHistoryIDList.Value);
         }
         Foresight.DataAccess.Ui.DataGrid dg = ViewRoomFeeHistory.GetViewRoomFeeHistoryGridByRoomID(RoomIDList, ProjectIDList, FeeID, StartChargeTime, EndChargeTime, IncludIsCharged, IncludePreCharge, IncludeDepoistCharge, DepoistStatus, PreChargeStatus, CompanyID, ChargeManID, ChargeSummaryID, ChargeTypeID, CategoryID, ChargeStatusIDList, RoomFeeOrderID, IsRoomFeeSearch, IsCuiShou, ContractID, "order by [PrintNumber] desc", startRowIndex, pageSize, HistoryIDList, ExcludeCuiShou, IncludeFooter: true, UserID: WebUtil.GetUser(this.Context).UserID);
         return(dg);
     }
     catch (Exception ex)
     {
         LogHelper.WriteError("CreateFeeOrder.aspx", "visit: LoadRoomFeeHistoryList", ex);
         return(null);
     }
 }
 private ViewRoomFeeHistory[] LoadRoomFeeHistoryList(int ContractID)
 {
     ViewRoomFeeHistory[] list = new ViewRoomFeeHistory[] { };
     try
     {
         int        CompanyID            = 0;
         List <int> RoomIDList           = new List <int>();
         List <int> ProjectIDList        = WebUtil.GetMyProjects(WebUtil.GetUser(this.Context).UserID).Where(p => p.ID != 1).Select(p => p.ID).ToList();
         int        FeeID                = 0;
         DateTime   StartChargeTime      = DateTime.MinValue;
         DateTime   EndChargeTime        = DateTime.MinValue;
         bool       IncludIsCharged      = false;
         bool       IncludePreCharge     = false;
         bool       IncludeDepoistCharge = false;
         int        DepoistStatus        = int.MinValue;
         int        PreChargeStatus      = int.MinValue;
         long       startRowIndex        = 0;
         int        pageSize             = int.MaxValue;
         string     ChargeMans           = string.Empty;
         int[]      ChargeManID          = new int[] { };
         int[]      ChargeSummaryID      = new int[] { };
         int[]      ChargeTypeID         = new int[] { };
         int[]      CategoryID           = new int[] { };
         List <int> ChargeStatusIDList   = new List <int>();
         int        RoomFeeOrderID       = 0;
         bool       IsRoomFeeSearch      = false;
         bool       IsCuiShou            = false;
         bool       ExcludeCuiShou       = false;
         List <int> HistoryIDList        = new List <int>();
         var        dg = ViewRoomFeeHistory.GetViewRoomFeeHistoryGridByRoomID(RoomIDList, ProjectIDList, FeeID, StartChargeTime, EndChargeTime, IncludIsCharged, IncludePreCharge, IncludeDepoistCharge, DepoistStatus, PreChargeStatus, CompanyID, ChargeManID, ChargeSummaryID, ChargeTypeID, CategoryID, ChargeStatusIDList, RoomFeeOrderID, IsRoomFeeSearch, IsCuiShou, ContractID, "order by [PrintNumber] desc", startRowIndex, pageSize, HistoryIDList, ExcludeCuiShou, UserID: WebUtil.GetUser(this.Context).UserID);
         list = dg.rows as ViewRoomFeeHistory[];
     }
     catch (Exception ex)
     {
         LogHelper.WriteError("AddContract.aspx", "visit: LoadRoomFeeHistoryList", ex);
     }
     return(list);
 }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.tdWidth.Value  = "210";
            this.tdHeight.Value = "99";
            int PrintID = 0;

            int.TryParse(Request.QueryString["PrintID"], out PrintID);
            string     IDs        = Request.QueryString["IDs"];
            List <int> IDList     = new List <int>();
            List <int> RoomIDList = new List <int>();

            if (PrintID == 0)
            {
                if (string.IsNullOrEmpty(IDs))
                {
                    Response.End();
                    return;
                }
            }
            if (!string.IsNullOrEmpty(IDs))
            {
                IDList = JsonConvert.DeserializeObject <List <int> >(IDs);
            }
            if (!IsPostBack)
            {
                int RoomID             = 0;
                int ContractID         = 0;
                int DefaultChargeManID = 0;
                if (PrintID > 0)
                {
                    var list = ViewRoomFeeHistory.GetViewRoomFeeHistoryListByIDs(0, IDList, PrintID);
                    if (list.Length > 0)
                    {
                        RoomID             = list[0].RoomID;
                        ContractID         = list[0].ContractID;
                        DefaultChargeManID = list[0].DefaultChargeManID;
                    }
                    this.rptProject.DataSource = list;
                    this.rptProject.DataBind();
                    printRoomFeeHistory = PrintRoomFeeHistory.GetPrintRoomFeeHistory(PrintID);
                }
                else
                {
                    var list = ViewTempRoomFeeHistory.GetViewTempRoomFeeHistoryListByIDs(IDList);
                    if (list.Length > 0)
                    {
                        RoomID = list[0].RoomID;
                    }
                    foreach (var item in list)
                    {
                        money     += item.ChargeFee;
                        TotalCost += item.Cost;
                    }
                    var historyfees = list;
                    this.rptProject.DataSource = historyfees;
                    this.rptProject.DataBind();
                }
                var project = Foresight.DataAccess.Project.GetProjectByID(ID: RoomID, ContractID: ContractID);
                if (project != null)
                {
                    this.tdRemark.Value     = project.PrintNote;
                    this.tdFirstTitle.Value = project.PrintTitle;
                    if (project.IsDefinePrintSize)
                    {
                        this.tdWidth.Value  = project.PrintWidth > 0 ? project.PrintWidth.ToString() : "210";
                        this.tdHeight.Value = project.PrintHeight > 0 ? project.PrintHeight.ToString() : WebUtil.GetPrintHeight().ToString();
                    }
                    else
                    {
                        this.tdWidth.Value  = "210";
                        this.tdHeight.Value = WebUtil.GetPrintHeight(project.PrintType).ToString();
                    }
                    this.FullName = project.FullName + "-" + project.Name;
                }
                RoomPhoneRelation relation = null;
                if (DefaultChargeManID > 0)
                {
                    relation = RoomPhoneRelation.GetRoomPhoneRelation(DefaultChargeManID);
                }
                if (relation == null)
                {
                    relation = RoomPhoneRelation.GetDefaultInChargeFeeRoomPhoneRelation(RoomID, ContractID);
                }
                if (relation != null)
                {
                    this.OwnerName = relation.RelationName;
                }
                if (PrintID <= 0)
                {
                    GetInfo(RoomID);
                }
                SetInfo();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            CanPrintCheque      = new Utility.SiteConfig().IsWriteChequeOn;
            this.tdWidth.Value  = "210";
            this.tdHeight.Value = "99";
            int.TryParse(Request.QueryString["PrintID"], out PrintID);
            string        IDs            = Request.QueryString["IDs"];
            List <int>    IDList         = new List <int>();
            List <int>    RoomIDList     = new List <int>();
            List <int>    ContractIDList = new List <int>();
            List <string> OwnerNameList  = new List <string>();

            if (PrintID == 0)
            {
                if (string.IsNullOrEmpty(IDs))
                {
                    Response.End();
                    return;
                }
            }
            if (!string.IsNullOrEmpty(IDs))
            {
                IDList = JsonConvert.DeserializeObject <List <int> >(IDs);
            }
            if (!IsPostBack)
            {
                if (PrintID > 0)
                {
                    var list = ViewRoomFeeHistory.GetViewRoomFeeHistoryListByIDs(0, IDList, PrintID);
                    if (list.Length > 0)
                    {
                        RoomIDList = list.Select(p => p.RoomID).Distinct().ToList();
                    }
                    else
                    {
                        Response.End();
                        return;
                    }
                    this.rptProject.DataSource = list;
                    this.rptProject.DataBind();
                    OwnerNameList       = list.Where(p => !string.IsNullOrEmpty(p.DefaultChargeManName)).Select(p => p.DefaultChargeManName).Distinct().ToList();
                    printRoomFeeHistory = PrintRoomFeeHistory.GetPrintRoomFeeHistory(PrintID);
                }
                else
                {
                    var list = ViewTempRoomFeeHistory.GetViewTempRoomFeeHistoryListByIDs(IDList);
                    if (list.Length > 0)
                    {
                        RoomIDList     = list.Select(p => p.RoomID).Distinct().ToList();
                        ContractIDList = list.Where(p => p.ContractID > 0).Select(p => p.ContractID).Distinct().ToList();
                    }
                    foreach (var item in list)
                    {
                        money     += item.RealCost;
                        TotalCost += item.Cost;
                    }
                    this.rptProject.DataSource = list;
                    this.rptProject.DataBind();
                    OwnerNameList = list.Where(p => !string.IsNullOrEmpty(p.DefaultChargeManName)).Select(p => p.DefaultChargeManName).Distinct().ToList();
                }
                RoomID     = RoomIDList.Count > 0 ? RoomIDList[0] : 0;
                ContractID = ContractIDList.Count > 0 ? ContractIDList[0] : 0;
                if (RoomIDList.Count > 0)
                {
                    RoomID = RoomIDList[0];
                }
                var project  = Foresight.DataAccess.Project.GetProjectByID(ID: RoomID, ContractID: ContractID);
                var relation = Foresight.DataAccess.RoomPhoneRelation.GetDefaultInChargeFeeRoomPhoneRelation(RoomID, ContractID);
                DefaultRelationID = relation != null ? relation.ID : 0;
                string AllParentID = string.Empty;
                if (project != null)
                {
                    AllParentID               = project.AllParentID;
                    this.tdRemark.Value       = project.PrintNote;
                    this.FirstTitle           = project.PrintTitle;
                    this.SubTitle             = project.PrintSubTitle;
                    this.PrintFont            = project.PrintFont;
                    this.IsPrintCount         = project.IsPrintCount;
                    this.IsPrintNote          = project.IsPrintNote;
                    this.IsPrintCost          = project.IsPrintCost;
                    this.IsPrintDiscount      = project.IsPrintDiscount;
                    this.IsPrintRoomNo        = project.IsPrintRoomNo;
                    this.IsPrintTotalRealCost = project.IsPrintTotalRealCost;
                    this.IsPrintRealCost      = project.IsPrintRealCost;
                    this.IsPrintMonthCount    = project.IsPrintMonthCount;
                    this.LogoPath             = project.LogoPath;
                    this.LogoWidth            = project.LogoWidth;
                    this.LogoHeight           = project.LogoHeight;
                    this.IsPrintUnitPrice     = project.IsPrintUnitPrice;
                    if (project.IsDefinePrintSize)
                    {
                        this.tdWidth.Value  = project.PrintWidth > 0 ? project.PrintWidth.ToString() : "210";
                        this.tdHeight.Value = project.PrintHeight > 0 ? project.PrintHeight.ToString() : WebUtil.GetPrintHeight().ToString();
                    }
                    else
                    {
                        this.tdWidth.Value  = "210";
                        this.tdHeight.Value = WebUtil.GetPrintHeight(project.PrintType).ToString();
                    }
                    this.FullName             = project.FullName + "-" + project.Name;
                    this.PrintChargeTypeCount = project.PrintChargeTypeCount;
                }
                if (this.IsPrintCount)
                {
                    this.ColumnCount++;
                }
                if (this.IsPrintNote)
                {
                    this.ColumnCount++;
                }
                if (this.IsPrintCost)
                {
                    this.ColumnCount++;
                }
                if (this.IsPrintDiscount)
                {
                    this.ColumnCount++;
                }
                if (this.IsPrintRoomNo)
                {
                    this.ColumnCount++;
                }
                if (this.IsPrintTotalRealCost)
                {
                    this.ColumnCount++;
                }
                if (this.IsPrintRealCost)
                {
                    this.ColumnCount++;
                }
                if (this.IsPrintMonthCount)
                {
                    this.ColumnCount++;
                }
                if (this.IsPrintUnitPrice)
                {
                    this.ColumnCount++;
                }
                if (string.IsNullOrEmpty(this.FirstTitle))
                {
                    this.FirstTitle = WebUtil.GetCompany(this.Context).CompanyName;
                }
                this.tdFirstTitle.Value = this.FirstTitle;
                if (string.IsNullOrEmpty(this.SubTitle))
                {
                    this.SubTitle = "收款单据";
                }
                this.tdSubTitle.InnerText = this.SubTitle;
                var  configList   = SysConfig.Get_SysConfigListByProjectIDList(MinProjectID: RoomID, MaxProjectID: RoomID, ConfigName: SysConfigNameDefine.RealCostCouZhengOn);
                bool isCouZhengOn = SysConfig.IsCouZhengOn(configList, AllParentID);
                if (isCouZhengOn)
                {
                    this.ShowWeiShu = true;
                }
                if (PrintID <= 0)
                {
                    GetInfo(RoomID, isCouZhengOn);
                }
                SetInfo(RoomID, isCouZhengOn);
                if (OwnerNameList.Count > 0)
                {
                    if (OwnerNameList.Count <= 3)
                    {
                        this.OwnerName = string.Join(",", OwnerNameList.ToArray());
                    }
                    else
                    {
                        this.OwnerName = OwnerNameList[0];
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string         GUID        = Request.QueryString["guid"];
            var            temp        = ChargeBackGuaranteeTemp.GetChargeBackGuaranteeTempListByGUID(GUID);
            List <decimal> RealPayList = new List <decimal>();
            List <string>  RemarkList  = new List <string>();

            this.tdWidth.Value  = "210";
            this.tdHeight.Value = "99";
            List <int> IDList = temp.Select(p => p.HistoryID).ToList();

            if (IDList.Count == 0)
            {
                Response.End();
                return;
            }
            if (!IsPostBack)
            {
                int RoomID             = 0;
                int DefaultChargeManID = 0;
                var list = ViewRoomFeeHistory.GetViewRoomFeeHistoryListByIDs(IDList);
                if (list.Length == 0)
                {
                    Response.End();
                    return;
                }
                RoomID             = list[0].RoomID;
                DefaultChargeManID = list[0].DefaultChargeManID;
                var historyfees = list;
                var newlist     = new List <RoomFeeModule>();
                foreach (var item in temp)
                {
                    var roomFeeModule      = new RoomFeeModule();
                    var viewRoomFeeHistory = list.FirstOrDefault(p => p.HistoryID == item.HistoryID);
                    if (viewRoomFeeHistory != null)
                    {
                        roomFeeModule.HistoryID   = viewRoomFeeHistory.HistoryID;
                        roomFeeModule.ChargeTime  = viewRoomFeeHistory.ChargeTime;
                        roomFeeModule.RealCost    = item.RealPay;
                        roomFeeModule.ChargeName  = viewRoomFeeHistory.ChargeName;
                        roomFeeModule.PrintNumber = viewRoomFeeHistory.PrintNumber;
                        roomFeeModule.Remark      = item.Remark;
                        roomFeeModule.ChargeMan   = viewRoomFeeHistory.ChargeMan;
                        this.money += roomFeeModule.RealCost;
                        newlist.Add(roomFeeModule);
                    }
                }
                this.rptProject.DataSource = newlist;
                this.rptProject.DataBind();
                var project = Foresight.DataAccess.Project.GetProjectByID(ID: RoomID, ContractID: 0);
                if (project != null)
                {
                    this.tdRemark.Value = project.PrintCancelNote;
                    if (project.IsDefinePrintSize)
                    {
                        this.tdWidth.Value  = project.PrintWidth > 0 ? project.PrintWidth.ToString() : "210";
                        this.tdHeight.Value = project.PrintHeight > 0 ? project.PrintHeight.ToString() : WebUtil.GetPrintHeight().ToString();
                    }
                    else
                    {
                        this.tdWidth.Value  = "210";
                        this.tdHeight.Value = WebUtil.GetPrintHeight(project.PrintType).ToString();
                    }
                    this.FirstTitle = project.PayPrintTitle;
                    this.SubTitle   = project.PayPrintSubTitle;
                    if (string.IsNullOrEmpty(this.FirstTitle))
                    {
                        this.FirstTitle = WebUtil.GetCompany(this.Context).CompanyName;
                    }
                    this.tdFirstTitle.InnerHtml = this.FirstTitle;
                    if (string.IsNullOrEmpty(this.SubTitle))
                    {
                        this.SubTitle = "付款单据";
                    }
                    this.tdSubTitle.InnerText = this.SubTitle;
                    this.FullName             = project.FullName + "-" + project.Name;
                }
                RoomPhoneRelation relation = null;
                if (DefaultChargeManID > 0)
                {
                    relation = RoomPhoneRelation.GetRoomPhoneRelation(DefaultChargeManID);
                }
                if (relation == null)
                {
                    relation = RoomPhoneRelation.GetDefaultInChargeFeeRoomPhoneRelation(RoomID, ContractID: 0);
                }
                if (relation != null)
                {
                    this.OwnerName = relation.RelationName;
                }
                GetInfo(RoomID);
                SetInfo();
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["RoomID"] != null)
         {
             int.TryParse(Request.QueryString["RoomID"], out RoomID);
         }
         if (Request.QueryString["DefaultRelationID"] != null)
         {
             int.TryParse(Request.QueryString["DefaultRelationID"], out DefaultRelationID);
         }
         if (Request.QueryString["ContractID"] != null)
         {
             int.TryParse(Request.QueryString["ContractID"], out ContractID);
         }
         if (Request.QueryString["PrintID"] != null)
         {
             int.TryParse(Request.QueryString["PrintID"], out PrintID);
         }
         if (PrintID > 0)
         {
             var history_list = ViewRoomFeeHistory.GetViewRoomFeeHistoryListByPrintID(PrintID);
             if (history_list.Length > 0)
             {
                 DefaultRelationID = history_list[0].DefaultChargeManID;
                 RoomID            = history_list[0].RoomID;
                 ContractID        = history_list[0].ContractID;
                 CanPrintCheque    = true;
             }
         }
         Foresight.DataAccess.RoomPhoneRelation data = null;
         RoomBasic basic = null;
         using (SqlHelper helper = new SqlHelper())
         {
             if (DefaultRelationID > 0)
             {
                 data = RoomPhoneRelation.GetRoomPhoneRelation(DefaultRelationID, helper);
             }
             if (data == null)
             {
                 data = RoomPhoneRelation.GetDefaultInChargeFeeRoomPhoneRelation(RoomID, ContractID, helper);
             }
             if (data == null)
             {
                 basic = RoomBasic.GetRoomBasicByRoomID(RoomID, helper);
             }
         }
         if (data != null)
         {
             this.RelationID                  = data.ID;
             this.tdCompanyName.Value         = data.CompanyName;
             this.tdAddress.Value             = data.HomeAddress;
             this.tdBuyerTaxpayerNumber.Value = data.TaxpayerNumber;
             this.tdBuyerBankAccountNo.Value  = data.BankAccountNo;
             this.tdBuyerBankName.Value       = data.BankName;
             this.tdBuyerEmailAddress.Value   = data.EmailAddress;
         }
         if (basic != null)
         {
             this.tdCompanyName.Value         = basic.ChequeCompanyName;
             this.tdAddress.Value             = basic.ChequeAddress;
             this.tdBuyerTaxpayerNumber.Value = basic.ChequeTaxpayerNumber;
             this.tdBuyerBankAccountNo.Value  = basic.ChequeBankNo;
             this.tdBuyerBankName.Value       = basic.ChequeBankName;
             this.tdBuyerEmailAddress.Value   = basic.ChequeEmailAddress;
         }
         var company = Company.GetCompanies().FirstOrDefault();
         if (company != null)
         {
             this.tdSellerCompanyName.Value    = string.IsNullOrEmpty(company.ChequeTitle) ? company.CompanyName : company.ChequeTitle;
             this.tdSellerAddress.Value        = company.Address;
             this.tdSellerTaxpayerNumber.Value = company.TaxpayerNumber;
             this.tdSellerBankNo.Value         = company.BankAccountNo;
             this.tdSellerBankName.Value       = company.BankName;
             this.tdReCheckUserName.Value      = company.ReCheckUserName;
             this.tdCheque_SL.Value            = company.Cheque_SL > decimal.MinValue ? company.Cheque_SL.ToString("0.00") : string.Empty;
             this.tdCheque_FLBM.Value          = company.Cheque_FLBM;
         }
     }
 }
示例#7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.tdWidth.Value  = "210";
         this.tdHeight.Value = "99";
         int.TryParse(Request.QueryString["PrintID"], out PrintID);
         int.TryParse(Request.QueryString["ChargeID"], out ChargeID);
         this.RoomIDs = Request.QueryString["RoomIDs"];
         List <int> RoomIDList = new List <int>();
         var        newlist    = new List <Utility.RoomFeeModule>();
         if (!string.IsNullOrEmpty(RoomIDs))
         {
             RoomIDList = JsonConvert.DeserializeObject <List <int> >(RoomIDs);
         }
         if (PrintID > 0)
         {
             printRoomFeeHistory = PrintRoomFeeHistory.GetPrintRoomFeeHistory(PrintID);
             var list = ViewRoomFeeHistory.GetPreChargeViewRoomFeeHistoryList(PrintID);
             for (int i = 0; i < list.Length; i++)
             {
                 var roomFeeModule = new Utility.RoomFeeModule();
                 roomFeeModule.ChargeFeeSummaryName    = list[i].ChargeFeeSummaryName;
                 roomFeeModule.RealCost                = list[i].RealCost;
                 roomFeeModule.ChargeFeeCurrentBalance = list[i].ChargeFeeCurrentBalance;
                 roomFeeModule.TotalRestBalance        = list[i].ChargeFeeCurrentBalance - list[i].RealCost;
                 newlist.Add(roomFeeModule);
             }
             this.money = printRoomFeeHistory.RealCost;
         }
         else
         {
             string ChargeFeeSummaryName = "退预收款";
             if (ChargeID > 0)
             {
                 var chargesummary = Foresight.DataAccess.ChargeSummary.GetChargeSummary(ChargeID);
                 ChargeFeeSummaryName = chargesummary != null ? "退" + chargesummary.Name : "退预收款";
             }
             decimal ChargeFeeCurrentBalance = Foresight.DataAccess.ViewRoomBalance.GetPreChargeBalance(RoomIDList, ChargeID);
             var     roomFeeModule           = new Utility.RoomFeeModule();
             roomFeeModule.ChargeFeeSummaryName    = ChargeFeeSummaryName;
             roomFeeModule.RealCost                = ChargeFeeCurrentBalance;
             roomFeeModule.ChargeFeeCurrentBalance = ChargeFeeCurrentBalance;
             roomFeeModule.TotalRestBalance        = 0;
             newlist.Add(roomFeeModule);
             this.money = ChargeFeeCurrentBalance;
         }
         this.rptProject.DataSource = newlist;
         this.rptProject.DataBind();
         var project = Foresight.DataAccess.Project.GetProject(RoomIDList[0]);
         if (project != null)
         {
             this.tdRemark.Value = project.PrintNote;
             if (project.IsDefinePrintSize)
             {
                 this.tdWidth.Value  = project.PrintWidth > 0 ? project.PrintWidth.ToString() : "210";
                 this.tdHeight.Value = project.PrintHeight > 0 ? project.PrintHeight.ToString() : WebUtil.GetPrintHeight().ToString();
             }
             else
             {
                 this.tdWidth.Value  = "210";
                 this.tdHeight.Value = WebUtil.GetPrintHeight(project.PrintType).ToString();
             }
             this.FirstTitle = project.PayPrintTitle;
             this.SubTitle   = project.PayPrintSubTitle;
             if (string.IsNullOrEmpty(this.FirstTitle))
             {
                 this.FirstTitle = WebUtil.GetCompany(this.Context).CompanyName;
             }
             this.tdFirstTitle.InnerHtml = this.FirstTitle;
             if (string.IsNullOrEmpty(this.SubTitle))
             {
                 this.SubTitle = "付款单据";
             }
             this.tdSubTitle.InnerText = this.SubTitle;
             this.FullName             = project.FullName + "-" + project.Name;
         }
         RoomPhoneRelation relation = null;
         if (relation == null)
         {
             relation = RoomPhoneRelation.GetDefaultInChargeFeeRoomPhoneRelation(RoomIDList[0], 0);
         }
         if (relation != null)
         {
             this.OwnerName = relation.RelationName;
         }
         if (printRoomFeeHistory == null)
         {
             GetInfo(RoomIDList[0]);
         }
         SetInfo();
     }
 }