/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit() { SellsSelect1.SetTitle = "管理责任人"; SellsSelect1.CallBackFun = "FixedAssets.GetAdminVal"; SelectSection1.SetTitle = "使用部门"; int id = Utils.GetInt(Utils.GetQueryStringValue("id")); if (id > 0) { MAsset model = new BFinance().GetAsset(id); if (model != null) { //编号 txt_Id.Text = model.AssetCode; //资产名称 txt_Name.Text = model.AssetName; //购买时间 txt_purchaseDate.Text = UtilsCommons.GetDateString(model.BuyTime, ProviderToDate); SellsSelect1.SellsName = model.Admin; SellsSelect1.SellsID = model.AdminId; //使用部门名称 SelectSection1.SectionName = model.Department; //使用部门Id SelectSection1.SectionID = model.DepartmentId.ToString(); //原始价值 txt_cost.Text = Utils.FilterEndOfTheZeroDecimal(model.BuyPrice); //折旧年限 txt_depreciationDateY.Text = model.DepreciableLife.ToString(); //备注 txt_Remark.Text = model.Remark; } } }
/// <summary> /// 初始化 /// </summary> private void DataInit() { //获取分页参数并强转 pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); #region 查询实体 MTourCheckBase queryModel = new MTourCheckBase(); queryModel.TourStatus = TourStatus.财务待核算; queryModel.CompanyId = CurrentUserCompanyID; queryModel.LDateStart = Utils.GetQueryStringValue("txt_SDate"); queryModel.LDateEnd = Utils.GetQueryStringValue("txt_EDate"); queryModel.TourCode = Utils.GetQueryStringValue("txt_teamNumber"); queryModel.RouteName = Utils.GetQueryStringValue("txt_lineName"); #endregion IList <MTourCheck> ls = new BFinance().GetTourCheckLst( pageSize, pageIndex, ref recordCount, queryModel, CheckGrant(TravelPermission.账务管理_单团核算_查看全部)); if (ls != null && ls.Count > 0) { rpt_list.DataSource = ls; rpt_list.DataBind(); //绑定分页 BindPage(); } else { lbl_msg.Text = "没有相关数据!"; ExporPageInfoSelect1.Visible = false; ExporPageInfoSelect2.Visible = false; } }
/// <summary> /// 初始化 /// </summary> private void DataInit() { //系统配置实体 MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting(); IsEnableKis = comModel.IsEnableKis; #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion MDebitBase queryModel = new MDebitBase(); queryModel.IsVerificated = Utils.GetQueryStringValue("verificated") == "1"; queryModel.CompanyId = CurrentUserCompanyID; queryModel.TourCode = Utils.GetQueryStringValue("txt_teamNumber"); queryModel.Borrower = txt_Seller.GuidName = Utils.GetQueryStringValue(txt_Seller.GuidNameClient); queryModel.BorrowerId = txt_Seller.GuidID = Utils.GetQueryStringValue(txt_Seller.GuidIDClient); IList <MDebit> ls = new BFinance().GetDebitLst(pageSize, pageIndex, ref recordCount, queryModel); if (ls != null && ls.Count > 0) { pan_msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); BindPage(pageSize, pageIndex, recordCount); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; }
/// <summary> /// 查询报表数据 /// </summary> private void BingCom() { pageIndex = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetQueryStringValue("Page")); MKingDeeProofBase searchModel = new MKingDeeProofBase(); searchModel.FDateS = Utils.GetQueryStringValue("txtDateStart"); searchModel.FDateE = Utils.GetQueryStringValue("txtDateEnd"); if (Utils.GetQueryStringValue("radImportYes") != "") { searchModel.FIsExport = Utils.GetQueryStringValue("radImportYes") == "true"; } searchModel.FTourCode = Utils.GetQueryStringValue("txtTourNo"); IList <MKingDeeProofDetail> list = new BFinance().GetKingDeeProofLst(pageSize, pageIndex, ref recordCount, SiteUserInfo.CompanyId, searchModel); if (list != null && list.Count > 0) { rpt_List.DataSource = list; rpt_List.DataBind(); BindPage(); } else { litMsg.Text = "<tr class='old'><td colspan='11' align='center'>没有相关数据</td></tr>"; ExporPageInfoSelect2.Visible = false; } }
/// <summary> /// 导出 /// </summary> private void ToXls() { int recordCount = 0; IList <MAsset> ls = new BFinance().GetAssetLst(UtilsCommons.GetToXlsRecordCount(), 1, ref recordCount, new MAssetBase { CompanyId = CurrentUserCompanyID }); if (ls != null && ls.Count > 0) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\n", "编号", "资产名称", "购买时间", "原始价值", "折旧年限", "使用部门", "管理责任人"); foreach (MAsset item in ls) { sb.Append(item.AssetCode + "\t"); sb.Append(item.AssetName + "\t"); sb.Append(UtilsCommons.GetDateString(item.BuyTime, ProviderToDate) + "\t"); sb.Append(UtilsCommons.GetMoneyString(item.BuyPrice, ProviderToMoney) + "\t"); sb.Append(item.DepreciableLife + "\t"); sb.Append(item.Department + "\t"); sb.Append(item.Admin + "\n"); } ResponseToXls(sb.ToString()); } ResponseToXls(string.Empty); }
/// <summary> /// 初始化 /// </summary> private void DataInit() { SellsSelect1.SetTitle = "选择 管理责任人"; SellsSelect1.ParentIframeID = Utils.GetQueryStringValue("iframeId"); SelectSection1.SetTitle = "选择 使用部门"; //获取分页参数并强转 pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); #region 查询实体 MAssetBase queryModel = new MAssetBase(); //编号 queryModel.AssetCode = Utils.GetQueryStringValue("txt_Id"); //资产名称 queryModel.AssetName = Utils.GetQueryStringValue("txt_propertyName"); queryModel.CompanyId = CurrentUserCompanyID; queryModel.Department = SelectSection1.SectionName = Utils.GetQueryStringValue(SelectSection1.SelectNameClient); queryModel.DepartmentId = Utils.GetInt(SelectSection1.SectionID = Utils.GetQueryStringValue(SelectSection1.SelectIDClient)); queryModel.Admin = SellsSelect1.SellsName = Utils.GetQueryStringValue(SellsSelect1.SellsNameClient); queryModel.AdminId = SellsSelect1.SellsID = Utils.GetQueryStringValue(SellsSelect1.SellsIDClient); #endregion IList <MAsset> ls = new BFinance().GetAssetLst(pageSize, pageIndex, ref recordCount, queryModel); if (ls != null && ls.Count > 0) { pan_Msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); BindPage(); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; }
protected void Page_Load(object sender, EventArgs e) { switch (Utils.GetQueryStringValue("doType")) { case "getAdjustItem": GetAdjustItemList(); break; case "getSubject": GetSubjectList(); break; case "Save": Save(); break; } DefaultProofType defaultProofType = (DefaultProofType)Utils.GetInt(Utils.GetQueryStringValue("DefaultProofType")); //if (defaultProofType != DefaultProofType.杂费收入 && defaultProofType != DefaultProofType.杂费支出) //{ IList <MKingDeeProofDetail> ls = new BFinance().GetDefaultProofLst( defaultProofType, CurrentUserCompanyID, Utils.GetQueryStringValue("KeyId")); if (ls != null && ls.Count > 0) { pan_tempRow.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); } //} }
/// <summary> /// 初始化 /// </summary> private void DataInit() { //系统配置实体 MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID); IsEnableKis = comModel == null ? false : comModel.IsEnableKis; IList <MOtherFeeInOut> sl = new BFinance().GetOtherFeeInOutLst(ParentItemType, Utils.ConvertToIntArray(OtherFeeID.Split(','))); if (sl != null && sl.Count > 0) { Status = (int)sl[0].Status; rpt_list.DataSource = sl; rpt_list.DataBind(); if (sl[0].Status != FinStatus.财务待审批) { lbl_audit.Text = sl[0].Audit; lbl_auditTime.Text = UtilsCommons.GetDateString(sl[0].AuditTime, ProviderToDate); lbl_auditRemark.Text = sl[0].AuditRemark; pan_ExamineVBtn.Visible = false; txt_auditRemark.Visible = false; pan_InMoney.Visible = true; } else { lbl_audit.Text = SiteUserInfo.Name; lbl_auditTime.Text = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate); lbl_auditRemark.Visible = false; } } else { pan_ExamineVBtn.Visible = false; txt_auditRemark.Visible = false; } }
/// <summary> /// 保存 /// </summary> private void Save() { string eARemark = Utils.GetFormValue(txt_EARemark.UniqueID); int[] registerIds = Utils.ConvertToIntArray(Utils.GetFormValue(hd_registerIds.UniqueID).Split(',')); string msg = string.Empty; if (registerIds.Length <= 0) { msg += "审批失败!"; } else { bool strBool = new BFinance().SetRegisterApprove( SiteUserInfo.UserId, //审核人ID SiteUserInfo.Name, //审核人 DateTime.Now, //审核时间(当前时间) eARemark, //审核意见 EyouSoft.Model.EnumType.FinStructure.FinStatus.账务待支付, //审核状态 CurrentUserCompanyID, //公司ID registerIds //登记编号集合 ) > 0; if (strBool) { AjaxResponse(UtilsCommons.AjaxReturnJson("1")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "审批失败!")); } } }
/// <summary> /// 初始化 /// </summary> private void DataInit() { BFinance bll = new BFinance(); string planId = Utils.GetQueryStringValue("planID"); if (planId != "") { //支出项目基本信息 MPayRegister model = bll.GetPayRegisterBaseByPlanId(planId); if (model != null) { lbl_listTitle.Text = "计调项:" + model.PlanTyp + " 单位名称:" + model.Supplier + " 结算金额:" + UtilsCommons.GetMoneyString(model.Payable, ProviderToMoney); lbl_listTitle.Text += " 已付金额" + UtilsCommons.GetMoneyString(model.Paid, ProviderToMoney) + " 未付金额:" + UtilsCommons.GetMoneyString(model.Unpaid, ProviderToMoney); if (model.PaymentType == EyouSoft.Model.EnumType.PlanStructure.Payment.导游现付) { this.phdAdd.Visible = false; } } //支出项目登记列表 IList <MRegister> ls = bll.GetPayRegisterLstByPlanId(planId); if (ls != null && ls.Count > 0) { rpt_list.DataSource = ls; rpt_list.DataBind(); } } }
/// <summary> /// to xls /// </summary> void ToXls() { int toXlsRecordCount = UtilsCommons.GetToXlsRecordCount(); if (toXlsRecordCount < 1) { ResponseToXls(string.Empty); } int _recordCount = 0; StringBuilder s = new StringBuilder(); var chaXunInfo = GetChaXunInfo(); var items = new BFinance().GetBillLst(toXlsRecordCount, 1, ref _recordCount, CurrentUserCompanyID, chaXunInfo); if (items == null || items.Count == 0) { ResponseToXls(string.Empty); } s.Append("团号\t客户单位\t销售员\t金额\t开票时间\t票据号\n"); foreach (var item in items) { s.Append(item.TourCode + "\t"); s.Append(item.Customer + "\t"); s.Append(item.SellerName + "\t"); s.Append(item.BillAmount.Value.ToString("F2") + "\t"); s.Append(item.BillTime.ToString("yyyy-MM-dd") + "\t"); s.Append(item.BillNo + "\n"); } ResponseToXls(s.ToString()); }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit() { MTourBaseInfo model = new BTour().GetTourInfo(Utils.GetQueryStringValue("TourId")); if (model != null) { lbl_uName.Text = model.SaleInfo.Name; txt_Price.Text = Utils.FilterEndOfTheZeroDecimal(model.SumPrice); pan_tourTye.Visible = model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼 || model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼 || model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼; } string distributeId = Utils.GetQueryStringValue("id"); if (distributeId.Length > 0) { MProfitDistribute DistributeModel = new BFinance().GetProfitDistribute(Utils.GetInt(distributeId), CurrentUserCompanyID); txt_distributeType.Text = DistributeModel.DistributeType; lbl_uName.Text = DistributeModel.Staff; txt_amount.Text = Utils.FilterEndOfTheZeroDecimal(DistributeModel.Amount); txt_remark.Text = DistributeModel.Remark; txt_OrderList.Text = DistributeModel.OrderCode; DistributeModel.OrderId = DistributeModel.OrderId ?? string.Empty; pan_tourTye.Visible = pan_tourTye.Visible || DistributeModel.OrderId.Length > 0; } }
/// <summary> /// 初始化 /// </summary> private void DataInit() { //系统配置实体 MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting(); IsEnableKis = comModel.IsEnableKis; #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion #region 配置用户控件 txt_SellsSelect.SetTitle = "选择 -请款人-"; //CustomerUnitSelect1.TxtCssClass = "formsize80"; //CustomerUnitSelect1.BoxyTitle = unitTitle + "单位"; #endregion #region 查询实体 MOtherFeeInOutBase queryModel = new MOtherFeeInOutBase(); //公司编号 queryModel.CompanyId = CurrentUserCompanyID; //付款时间--始 queryModel.DealTimeS = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txt_inDateS")); //付款时间--终 queryModel.DealTimeE = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txt_inDateE")); //付款项目 queryModel.FeeItem = Utils.GetQueryStringValue("txt_PayItemName"); //客户单位Id queryModel.CrmId = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHBH); //客户单位Name queryModel.Crm = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHMC); //销售员Id queryModel.DealerId = txt_SellsSelect.SellsID = Utils.GetQueryStringValue(txt_SellsSelect.SellsIDClient); //销售员Name queryModel.Dealer = txt_SellsSelect.SellsName = Utils.GetQueryStringValue(txt_SellsSelect.SellsNameClient); queryModel.Status = (FinStatus)Utils.GetIntSign(Utils.GetQueryStringValue("Status"), -1); #endregion #region 绑定列表 BFinance bfBLL = new BFinance(); IList <MOtherFeeInOut> ls = bfBLL.GetOtherFeeInOutLst( pageSize, pageIndex, ref recordCount, ItemType.支出, queryModel); if (ls != null && ls.Count > 0) { pan_Msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); //绑定分页 BindPage(pageSize, pageIndex, recordCount); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; #endregion }
/// <summary> /// 导出 /// </summary> private void ToXls() { int recordCount = 0; MBudgetContrast sumModel = new MBudgetContrast(); MBudgetContrastBase queryString = new MBudgetContrastBase(); queryString.TourCode = Utils.GetQueryStringValue("txt_teamNumber"); queryString.RouteName = Utils.GetQueryStringValue("txt_lineName"); queryString.LDateS = Utils.GetQueryStringValue("txt_SDate"); queryString.LDateE = Utils.GetQueryStringValue("txt_EDate"); queryString.SellerId = txt_Seller.SellsID = Utils.GetQueryStringValue(txt_Seller.SellsIDClient); queryString.SellerName = txt_Seller.SellsName = Utils.GetQueryStringValue(txt_Seller.SellsNameClient); queryString.PlanerId = txt_Plan.SellsID = Utils.GetQueryStringValue(txt_Plan.SellsIDClient); queryString.Planer = txt_Plan.SellsName = Utils.GetQueryStringValue(txt_Plan.SellsNameClient); IList <MBudgetContrast> ls = new BFinance().GetBudgetContrastLst( UtilsCommons.GetToXlsRecordCount(), 1, ref recordCount, ref sumModel, CurrentUserCompanyID, queryString); if (ls != null && ls.Count > 0) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}\t{11}\n", "团号", "线路名称", "客户单位", "出团时间", "销售员", "计调员", "费用预算收入", "费用预算支出", "费用预算毛利", "结算费用收入", "结算费用支出", "结算费用毛利"); foreach (MBudgetContrast item in ls) { sb.Append(item.TourCode + "\t"); sb.Append(item.RouteName + "\t"); sb.Append(item.Crm + "\t"); sb.Append(UtilsCommons.GetDateString(item.LDate, ProviderToDate) + "\t"); sb.Append(item.SellerName + "\t"); sb.Append(item.Planer + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.BudgetIncome, ProviderToMoney) + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.BudgetOutgo, ProviderToMoney) + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.BudgetGProfit, ProviderToMoney) + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.ClearingIncome, ProviderToMoney) + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.ClearingOutgo, ProviderToMoney) + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.ClearingGProfit, ProviderToMoney) + "\n"); } ResponseToXls(sb.ToString()); } ResponseToXls(string.Empty); }
/// <summary> /// 初始化 /// </summary> private void DataInit() { #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion #region 配置用户控件 txt_SellsSelect.SetTitle = "选择 -销售员-"; #endregion #region 查询实体 MOtherFeeInOutBase queryModel = new MOtherFeeInOutBase(); //公司编号 queryModel.CompanyId = CurrentUserCompanyID; //收款时间--始 queryModel.DealTimeS = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txt_inDateS")); //收款时间--终 queryModel.DealTimeE = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txt_inDateE")); //收款项目 queryModel.FeeItem = Utils.GetQueryStringValue("txt_inItemName"); //客户单位Id queryModel.CrmId = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHBH); //客户单位Name queryModel.Crm = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHMC); //销售员Id queryModel.DealerId = Utils.GetQueryStringValue(txt_SellsSelect.ClientID + "_hideSellID"); //销售员Name queryModel.Dealer = Utils.GetQueryStringValue(txt_SellsSelect.ClientID + "_txtSellName"); txt_SellsSelect.SellsID = queryModel.DealerId; txt_SellsSelect.SellsName = queryModel.Dealer; queryModel.Status = (FinStatus)Utils.GetIntSign("-1", -1); #endregion #region 绑定列表 IList <MOtherFeeInOut> ls = new BFinance().GetOtherFeeInOutLst( pageSize, pageIndex, ref recordCount, ItemType.收入, queryModel ); if (ls != null && ls.Count > 0) { pan_Msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); //绑定分页 BindPage(pageSize, pageIndex, recordCount); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; #endregion }
protected void Page_Load(object sender, EventArgs e) { IList <MKingDeeChk> ls = new BFinance().GetKingDeeChkLst(CurrentUserCompanyID, "0"); if (ls != null && ls.Count > 0) { pan_msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); } }
/// <summary> /// 获取财务入账 /// </summary> /// <returns></returns> protected string GetFinIn() { var bll = new BFinance(); return(bll.IsFinIn( DefaultProofType.团未完导游先报账, Utils.GetQueryStringValue("tourId"), this.SiteUserInfo.CompanyId) || bll.IsFinIn(DefaultProofType.单团核算, Utils.GetQueryStringValue("tourId"), this.SiteUserInfo.CompanyId) ? "已入帐" : "未入账"); }
/// <summary> /// 初始化 /// </summary> private void DataInit() { string OtherFeeID = Utils.GetQueryStringValue("OtherFeeID"); IList <MOtherFeeInOut> sl = new BFinance().GetOtherFeeInOutLst(ItemType.支出, Utils.ConvertToIntArray(OtherFeeID.Split(','))); txt_PMDate.Text = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate); lbl_PPerson.Text = SiteUserInfo.Name; if (sl != null && sl.Count > 0) { rpt_list.DataSource = sl; rpt_list.DataBind(); } }
/// <summary> /// 导出 /// </summary> private void ToXls() { int recordCount = 0; //金额汇总信息 decimal sum = 0; MAuditBase queryModel = new MAuditBase(); queryModel.TourCode = Utils.GetQueryStringValue("tourID"); queryModel.IssueTimeS = Utils.GetQueryStringValue("SDate"); queryModel.IssueTimeE = Utils.GetQueryStringValue("EDate"); queryModel.SellerId = txt_Seller.SellsID = Utils.GetQueryStringValue(txt_Seller.SellsIDClient); queryModel.SellerName = txt_Seller.SellsName = Utils.GetQueryStringValue(txt_Seller.SellsNameClient); queryModel.Crm = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHMC); queryModel.CrmId = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHBH); IList <MReconciliation> ls = new BFinance().GetReconciliationLst( UtilsCommons.GetToXlsRecordCount(), 1, ref recordCount, ref sum, ReconciliationType.今日应收, CurrentUserCompanyID, queryModel); if (ls != null && ls.Count > 0) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\n", "订单号", "线路名称", "客户单位", "销售员", "应收金额", "核算日期", "财务人"); foreach (MReconciliation item in ls) { sb.Append(item.OrderCode + "\t"); sb.Append(item.RouteName + "\t"); sb.Append(item.Crm + "\t"); sb.Append(item.SellerName + "\t"); sb.Append(UtilsCommons.GetMoneyString(item.Amount, ProviderToMoney) + "\t"); sb.Append(UtilsCommons.GetDateString(item.IssueTime, ProviderToDate) + "\t"); sb.Append(item.Operator + "\n"); } ResponseToXls(sb.ToString()); } ResponseToXls(string.Empty); }
/// <summary> /// 删除 /// </summary> private void DeleteData() { int[] ids = Utils.ConvertToIntArray(Utils.GetQueryStringValue("ids")); string userd = string.Empty; int flag = new BFinance().DelKingDeeSubject(this.SiteUserInfo.CompanyId, ref userd, ids); string[] msgarr = { UtilsCommons.AjaxReturnJson("1", "删除成功!"), UtilsCommons.AjaxReturnJson("-1", "删除失败!"), UtilsCommons.AjaxReturnJson("-1", userd + "删除执行终止!") }; AjaxResponse(msgarr[flag]); }
protected void Page_Load(object sender, EventArgs e) { MBill model = new BFinance().GetBillMdl(CurrentUserCompanyID, Utils.GetInt(Utils.GetQueryStringValue("billID"))); if (model != null) { lbl_billTime.Text = UtilsCommons.GetDateString(model.BillTime, ProviderToDate); lbl_billAmount.Text = UtilsCommons.GetMoneyString(model.BillAmount, ProviderToMoney); lbl_billNo.Text = model.BillNo; lbl_remark.Text = model.Remark; lbl_approver.Text = model.Approver; lbl_approveTime.Text = UtilsCommons.GetDateString(model.ApproveTime, ProviderToDate); lbl_approveRemark.Text = model.ApproveRemark; } }
/// <summary> /// 导出 /// </summary> private void ToXls() { int recordCount = 0; MBatchWriteOffOrder sumModel = new MBatchWriteOffOrder(); IList <MBatchWriteOffOrder> ls = new BFinance().GetArrearOrderLstByCrmId( UtilsCommons.GetToXlsRecordCount(), 1, ref recordCount, ref sumModel, Utils.GetQueryStringValue("crmId")); if (ls != null && ls.Count > 0) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\n", "团号", "线路名称", "人数", "出团时间", "下单时间", "应付金额", "已付金额", "未付金额"); foreach (MBatchWriteOffOrder item in ls) { sb.Append(item.TourCode + "\t"); sb.Append(item.RouteName + "\t"); sb.Append(item.AdultNum + "+" + item.ChildNum + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetDateString(item.LDate, ProviderToDate) + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetDateString(item.OrderTime, ProviderToDate) + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.Receivable, ProviderToMoney) + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.Received, ProviderToMoney) + "\t"); sb.Append(EyouSoft.Common.UtilsCommons.GetMoneyString(item.Unreceivable, ProviderToMoney) + "\n"); } sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\n", "", "", "", "", "合计", UtilsCommons.GetMoneyString(sumModel.Receivable, ProviderToMoney), UtilsCommons.GetMoneyString(sumModel.Received, ProviderToMoney), UtilsCommons.GetMoneyString(sumModel.Unreceivable, ProviderToMoney)); ResponseToXls(sb.ToString()); } ResponseToXls(string.Empty); }
/// <summary> /// 初始化 /// </summary> private void DataInit() { IList <MRegister> ls = new BFinance().GetRegisterById( CurrentUserCompanyID, Utils.ConvertToIntArray(Utils.GetQueryStringValue("registerIds").Split(',')) ); if (ls != null && ls.Count > 0) { rpt_list.DataSource = ls; rpt_list.DataBind(); lbl_amount.Text = UtilsCommons.GetMoneyString(ls.Sum(item => item.PaymentAmount), ProviderToMoney); } lbl_EAPerson.Text = SiteUserInfo.Name; txt_EADate.Text = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate); }
/// <summary> /// 初始化 /// </summary> private void DataInit() { IList <MPayRegister> ls = new BFinance().GetPayRegisterBaseByPlanId(Utils.GetQueryStringValue("planIDs").Split(',')); if (ls != null && ls.Count > 0) { rpt_list.DataSource = ls; rpt_list.DataBind(); this.litMsg.Visible = false; } else { this.phdSave.Visible = false; this.litMsg.Visible = true; } }
/// <summary> /// 保存 /// </summary> private void Save() { int id = Utils.GetInt(Utils.GetQueryStringValue("id")); BFinance bll = new BFinance(); MAsset model = id > 0 ? bll.GetAsset(id) : new MAsset(); string msg = string.Empty; if (GetPageVal(model, ref msg)) { PageResponse(UtilsCommons.AjaxReturnJson((id > 0 ? bll.UpdAsset(model) : bll.AddAsset(model)) ? "1" : "-1", model.Id > 0 ? "修改失败!" : "保存失败!")); } else { PageResponse(UtilsCommons.AjaxReturnJson("-1", msg)); } }
/// <summary> /// 删除操作 /// </summary> /// <returns></returns> private void DeleteData() { bool retBool = new BFinance().DelOtherFeeInOut( CurrentUserCompanyID, ItemType.支出, Utils.ConvertToIntArray(Utils.GetFormValue("Ids").Split(',')) ) > 0; if (retBool) { AjaxResponse(UtilsCommons.AjaxReturnJson("1")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "删除失败!")); } }
/// <summary> /// 保存 /// </summary> private void Save() { string msg = string.Empty; BFinance bll = new BFinance(); switch (Utils.GetFormValue("doType")) { case "ExamineV": bool retBool = bll.SetApproveBill(CurrentUserCompanyID, Utils.GetInt(Utils.GetFormValue("Id")), true, SiteUserInfo.UserId, SiteUserInfo.Name, string.Empty, DateTime.Now, Utils.GetFormValue("BillNo")); if (retBool) { AjaxResponse(UtilsCommons.AjaxReturnJson("1")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "审核失败!")); } break; case "Delete": if (bll.DelBill(CurrentUserCompanyID, Utils.GetInt(Utils.GetFormValue("Id")))) { AjaxResponse(UtilsCommons.AjaxReturnJson("1")); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "删除失败!")); } break; default: /*添加修改*/ msg = UpdateModel(); if (msg != "") { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", msg)); } else { AjaxResponse(UtilsCommons.AjaxReturnJson("1", "开票成功!")); } break; } bll = null; }
/// <summary> /// 初始化 /// </summary> private void DataInit() { #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion txt_SellsSelect.SetTitle = "选择 销售员"; txt_SellsSelect.SellsName = Utils.GetQueryStringValue(txt_SellsSelect.SellsNameClient); txt_SellsSelect.SellsID = Utils.GetQueryStringValue(txt_SellsSelect.SellsIDClient); MWarningBase model = new MWarningBase(); model.SellerId = Utils.GetQueryStringValue(txt_SellsSelect.SellsIDClient); model.SellerName = Utils.GetQueryStringValue(txt_SellsSelect.SellsNameClient); model.SignArrear = (EqualSign?)Utils.GetEnumValueNull(typeof(EqualSign), Utils.GetQueryStringValue(CaiWuShaiXuan1.ClientUniqueIDOperator)); model.Arrear = Utils.GetDecimalNull(Utils.GetQueryStringValue(CaiWuShaiXuan1.ClientUniqueIDOperatorNumber)); model.SignTransfinite = (EqualSign?)Utils.GetEnumValueNull(typeof(EqualSign), Utils.GetQueryStringValue(CaiWuShaiXuan2.ClientUniqueIDOperator)); model.Transfinite = Utils.GetDecimalNull(Utils.GetQueryStringValue(CaiWuShaiXuan2.ClientUniqueIDOperatorNumber)); //部门 int department = Utils.GetIntSign(Utils.GetQueryStringValue("sel_department"), -1); if (department >= 0) { model.DeptId = department; } IList <MComDepartment> lst = new EyouSoft.BLL.ComStructure.BComDepartment().GetList(CurrentUserCompanyID); StringBuilder sb = new StringBuilder(); foreach (MComDepartment item in lst) { sb.Append("<option " + ((item.DepartId == model.DeptId) ? "selected=selected" : "") + " value=" + item.DepartId + ">-" + item.DepartName + "-</option>"); } DepartmentOptionStr = sb.ToString(); IList <MSalesmanWarning> ls = new BFinance().GetSalesmanWarningLst( pageSize, pageIndex, ref recordCount, CurrentUserCompanyID, model); if (ls != null && ls.Count > 0) { pan_Msg.Visible = false; rpt_list.DataSource = ls; rpt_list.DataBind(); //绑定分页 BindPage(pageSize, pageIndex, recordCount); } }
/// <summary> /// 保存审核 /// </summary> void Save() { if (!CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.财务管理_应收管理_收款审核)) { AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败:没有权限。")); } IList <MTourOrderSales> ls = new List <MTourOrderSales>(); string[] datas = Utils.GetFormValue("list").Split(','); if (datas.Length > 0) { foreach (string item in datas) { string[] subdatas = item.Split('|'); if (subdatas.Length == 2) { ls.Add(new MTourOrderSales { Approver = SiteUserInfo.Name, ApproverDeptId = SiteUserInfo.DeptId, ApproverId = SiteUserInfo.UserId, ApproveTime = DateTime.Now, Id = subdatas[1], OrderId = subdatas[0] }); } } } IList <string> retMsg = new BFinance().SetTourOrderSalesCheck(ls); if (retMsg == null || retMsg.Count <= 0) { AjaxResponse(UtilsCommons.AjaxReturnJson("1")); } else { string strMsg = string.Empty; foreach (string item in retMsg) { strMsg += item + "<br/>"; } strMsg += "审核失败!"; AjaxResponse(UtilsCommons.AjaxReturnJson("-1", strMsg)); } }
/// <summary> /// 绑定数据 /// </summary> protected void DataInit() { #region 分页参数 int pageSize = 20; int pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); int recordCount = 0; #endregion IList <MKingDeeSubject> ls = new BFinance().GetKingDeeSubjectLst(pageSize, pageIndex, ref recordCount, SiteUserInfo.CompanyId); if (ls != null && ls.Count > 0) { pan_msg.Visible = false; prt_list.DataSource = ls; prt_list.DataBind(); BindPage(pageSize, pageIndex, recordCount); } ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize; }