Пример #1
0
    public void InitDepartment()
    {
        PTdbmService pTdbmService = new PTdbmService();
        PTdbm        byId         = pTdbmService.GetById(1);

        this.lblTitle.Text = byId.V_BMMC + "付款报销单";
    }
Пример #2
0
    public string GetPrjOrOrg(object inDiaryIdObj)
    {
        string inDiaryId          = inDiaryIdObj.ToString();
        BudIndirectDiaryCost byId = this.cSer.GetById(inDiaryId);

        if (byId == null)
        {
            return(string.Empty);
        }
        string result = string.Empty;

        if (byId.CostType == "P")
        {
            PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
            PTPrjInfo        byId2            = pTPrjInfoService.GetById(byId.ProjectId);
            if (byId2 != null)
            {
                result = byId2.PrjName;
            }
        }
        else
        {
            PTdbmService pTdbmService = new PTdbmService();
            PTdbm        byId3        = pTdbmService.GetById(byId.ProjectId);
            if (byId3 != null)
            {
                result = byId3.V_bmqc;
            }
        }
        return(result);
    }
Пример #3
0
    public void GetPattyCash()
    {
        PTdbmService             pTdbmService             = new PTdbmService();
        PTYhmcService            pTYhmcService            = new PTYhmcService();
        BasicSerialNumberService basicSerialNumberService = new BasicSerialNumberService();
        PTdbm byId = pTdbmService.GetById(1);

        this.lblTitle.Text       = byId.V_BMMC + "备用金申请表";
        this.lblPayMentDate.Text = System.DateTime.Now.ToShortDateString();
        if (!string.IsNullOrEmpty(this.pcId))
        {
            PCPettyCash byId2 = this.pcSer.GetById(this.pcId);
            if (byId2 != null)
            {
                PTyhmc byId3 = pTYhmcService.GetById(byId2.Applicant);
                PTdbm  byId4 = pTdbmService.GetById(byId3.i_bmdm);
                this.lblDepartMent.Text = byId4.V_BMMC;
                this.lblOperator.Text   = byId3.v_xm;
                this.lblContent.Text    = byId2.Matter;
                this.lblMoney.Text      = byId2.Cash.ToString();
                this.lblTotalMoney.Text = this.lblMoney.Text;
                this.lblDrawPeople.Text = byId3.v_xm;
                this.lblpayee.Text      = byId2.Payee;
                this.lblBank.Text       = byId2.Bank;
                this.lblAccount.Text    = byId2.Account;
                if (byId2.Project != null)
                {
                    this.lblProjectCode.Text = byId2.Project.PrjCode;
                }
                this.lblFileNumber.Text = basicSerialNumberService.GetNo("PC_PettyCash", this.pcId);
            }
        }
    }
Пример #4
0
    private void Initial()
    {
        PTdbmService  pTdbmService  = new PTdbmService();
        PTYhmcService pTYhmcService = new PTYhmcService();
        PTdbm         byId          = pTdbmService.GetById(1);

        this.lblTitle.Text = byId.V_BMMC + "备用金申请表";
        if (!string.IsNullOrEmpty(this.pcId))
        {
            PCPettyCash byId2 = this.pcSer.GetById(this.pcId);
            if (byId2 != null)
            {
                this.hfldPettyCashIds.Value = this.pcId;
                PTyhmc byId3 = pTYhmcService.GetById(byId2.Applicant);
                PTdbm  byId4 = pTdbmService.GetById(byId3.i_bmdm);
                this.lblPayer.Text           = byId2.Payer;
                this.lblApplicationDate.Text = byId2.ApplicationDate.ToString("yyyy-MM-dd");
                this.lblDepart.Text          = byId4.V_BMMC;
                this.lblApplicant.Text       = byId3.v_xm;
                this.lblAccount.Text         = byId2.Account;
                this.lblBank.Text            = byId2.Bank;
                this.lblMatter.Text          = byId2.Matter;
                if (byId2.Project != null)
                {
                    this.lblProject.Text = byId2.Project.PrjName;
                }
                this.lblCash.Text              = byId2.Cash.ToString();
                this.lblpayee.Text             = byId2.Payee;
                this.lblCashDate.Text          = byId2.CashDate.ToString("yyyy-MM-dd");
                this.lblApplicationReason.Text = StringUtility.ReplaceTxt(byId2.ApplicationReason);
            }
        }
    }
Пример #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack && this.action == "edit")
     {
         PTdbm byId = this.dSer.GetById(this.id);
         this.txtNo.Text   = byId.I_xh.Value.ToString();
         this.txtName.Text = byId.V_BMMC;
     }
 }
Пример #6
0
    private string GetDepFullName(string depid)
    {
        PTdbmService pTdbmService = new PTdbmService();
        PTdbm        byId         = pTdbmService.GetById(depid);

        if (byId != null)
        {
            return(byId.V_bmqc);
        }
        return(string.Empty);
    }
Пример #7
0
        public IList <Department> GetDepartment(int level = 10)
        {
            IList <Department> list       = new List <Department>();
            List <PTdbm>       allDepList = (from d in new PTdbmService()
                                             where d.C_sfyx == "y"
                                             select d).ToList <PTdbm>();
            PTdbm depment = (from d in allDepList
                             where d.I_bmdm == 1
                             select d).First <PTdbm>();
            Department byDepment = this.GetByDepment(depment);

            this.AddChildren(byDepment, allDepList, level - 1);
            list.Add(byDepment);
            return(list);
        }
Пример #8
0
    private void EditDep()
    {
        try
        {
            int    value  = Convert.ToInt32(this.txtNo.Text.Trim());
            string v_BMMC = this.txtName.Text.Trim();
            PTdbm  byId   = this.dSer.GetById(this.id);
            byId.I_xh   = new int?(value);
            byId.V_BMMC = v_BMMC;
            this.dSer.Update(byId);

            DataTable dt = publicDbOpClass.DataTableQuary("select * from PT_d_bm where i_bmdm = " + this.id);
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dataRow in dt.Rows)
                {
                    try
                    {
                        string strResult = WXAPI.createWXdpt(dt.Rows[0]);
                        if (strResult == "0")
                        {
                            base.RegisterScript("editSucessed();");
                        }
                        else
                        {
                            base.RegisterScript("top.ui.show( '编辑成功,同步到微信失败'); \n top.ui.closeWin(); \n");
                        }
                    }
                    catch
                    {
                        base.RegisterScript("top.ui.show( '编辑成功,同步到微信失败'); \n top.ui.closeWin(); \n");
                    }
                }
            }
            else
            {
                base.RegisterScript("top.ui.show( '编辑成功,同步到微信失败'); \n top.ui.closeWin(); \n");
            }
        }
        catch
        {
            base.RegisterScript("top.ui.show( '编辑失败'); \n top.ui.closeWin(); \n");
        }
    }
Пример #9
0
    private void Initial()
    {
        PTdbmService  pTdbmService  = new PTdbmService();
        PTYhmcService pTYhmcService = new PTYhmcService();
        PTdbm         byId          = pTdbmService.GetById(1);

        this.lblTitle.Text = byId.V_BMMC + "备用金申请表";
        if (string.Compare(this.type, "Add", true) == 0)
        {
            this.txtPayer.Text           = byId.V_BMMC;
            this.txtApplicationDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
            this.txtCashDate.Text        = System.DateTime.Now.AddDays(3.0).ToString("yyyy-MM-dd");
            PTyhmc byId2 = pTYhmcService.GetById(base.UserCode);
            this.txtApplicant.Text = byId2.v_xm;
            PTdbm byId3 = pTdbmService.GetById(byId2.i_bmdm);
            this.txtDepart.Text = byId3.V_BMMC;
        }
        if (!string.IsNullOrEmpty(this.pcId))
        {
            PCPettyCash byId4 = this.pcSer.GetById(this.pcId);
            if (byId4 != null)
            {
                PTyhmc byId5 = pTYhmcService.GetById(byId4.Applicant);
                PTdbm  byId6 = pTdbmService.GetById(byId5.i_bmdm);
                this.txtPayer.Text           = byId4.Payer;
                this.txtApplicationDate.Text = byId4.ApplicationDate.ToString("yyyy-MM-dd");
                this.txtDepart.Text          = byId6.V_BMMC;
                this.txtApplicant.Text       = byId5.v_xm;
                this.txtAccount.Text         = byId4.Account;
                this.txtBank.Text            = byId4.Bank;
                this.txtMatter.Text          = byId4.Matter;
                if (byId4.Project != null)
                {
                    this.txtProject.Text       = byId4.Project.PrjName;
                    this.hfldPrjTypeCode.Value = byId4.Project.TypeCode;
                }
                this.txtCash.Text              = byId4.Cash.ToString();
                this.txtCashDate.Text          = byId4.CashDate.ToString("yyyy-MM-dd");
                this.txtApplicationReason.Text = byId4.ApplicationReason;
                this.txtpayee.Text             = byId4.Payee;
            }
        }
    }
Пример #10
0
        private Department GetByDepment(PTdbm depment)
        {
            Department department = new Department {
                Id = depment.I_bmdm.ToString()
            };
            string str = depment.V_BMMC;

            if (str.Length > 20)
            {
                str = str.Substring(0, 20);
            }
            department.Text = str;
            if (this.GetChildren(department.Id).Count > 0)
            {
                department.State = "closed";
            }
            if (department.Id == "1")
            {
                department.State = "open";
            }
            return(department);
        }
Пример #11
0
        private DepEmployee GetByDepment(PTdbm depment)
        {
            DepEmployee employee = new DepEmployee {
                Id = depment.I_bmdm.ToString()
            };
            string str = depment.V_BMMC;

            if (str.Length > 20)
            {
                str = str.Substring(0, 20);
            }
            employee.Text = str;
            if (this.GetChildren(employee.Id).Count > 0)
            {
                employee.State = "closed";
            }
            if (employee.Id == "1")
            {
                employee.State = "open";
            }
            return(employee);
        }
Пример #12
0
    private void InitDiary()
    {
        BudIndirectDiaryCost byId = this.diarySer.GetById(this.diaryId);

        this.lblName.Text       = byId.Name;
        this.lblInputDate.Text  = byId.InputDate.ToString("yyyy-MM-dd");
        this.lblDepartment.Text = byId.Department;
        this.lblInputUser.Text  = byId.InputUser;
        this.lblIssueBy.Text    = byId.IssuedBy;
        this.lblCode.Text       = byId.IndireCode;
        if (byId.CostType == "P")
        {
            PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
            PTPrjInfo        byId2            = pTPrjInfoService.GetById(byId.ProjectId);
            if (byId2 != null)
            {
                this.lblPrjName.Text = byId2.PrjName;
            }
        }
        else
        {
            this.ltlCostTypeName.Text = "组织机构";
            PTdbmService pTdbmService = new PTdbmService();
            PTdbm        byId3        = pTdbmService.GetById(byId.ProjectId);
            if (byId3 != null)
            {
                this.lblPrjName.Text = byId3.V_bmqc;
            }
        }
        PCPettyCashService pCPettyCashService = new PCPettyCashService();
        PCPettyCash        byId4 = pCPettyCashService.GetById(byId.PettyCashId);

        if (byId4 != null)
        {
            this.lblPettyCash.Text = byId4.Matter;
        }
    }
Пример #13
0
    public void InitDepartment()
    {
        PTdbm byId = this.bmSer.GetById(1);

        this.lblTitle.Text = byId.V_BMMC + "预报销明细";
    }
Пример #14
0
    public void InitPage()
    {
        OutReserveModel model = null;

        if (base.Request.QueryString["id"] != null && base.Request.QueryString["ic"] == null)
        {
            model = this.outReserveBll.GetModel(base.Request.QueryString["id"]);
        }
        else
        {
            if (base.Request.QueryString["ic"] != null)
            {
                model = this.outReserveBll.GetModelByIc(base.Request.QueryString["ic"]);
            }
        }

        this.lblExplain.Text       = model.explain;
        this.lblInTime.Text        = Common2.GetTime(model.intime.ToString());
        this.lblPeople.Text        = model.person;
        this.lblPPCode.Text        = model.orcode;
        this.lblPickingPeople.Text = model.PickingPeople;
        PTdbmService source = new PTdbmService();
        PTdbm        pTdbm  = (
            from dbm in source
            where dbm.V_bmbm == model.PickingSector && dbm.C_sfyx == "y"
            select dbm).FirstOrDefault <PTdbm>();

        if (pTdbm != null)
        {
            this.lblPickingSector.Text = pTdbm.V_BMMC;
        }
        else
        {
            this.lblPickingSector.Text = model.PickingSector;
        }
        PrjInfoModel modelByPrjGuid = this.pTPrjInfoBll.GetModelByPrjGuid(model.procode);

        if (modelByPrjGuid != null)
        {
            this.lblProjectName.Text = modelByPrjGuid.PrjName;
        }
        else
        {
            DataTable tableByPrjGuid = this.pTPrjInfoBll.GetTableByPrjGuid(model.procode);
            if (tableByPrjGuid.Rows.Count > 0)
            {
                this.lblProjectName.Text = tableByPrjGuid.Rows[0]["prjName"].ToString().Trim();
            }
        }
        this.lblBllProducer.Text  = model.person;
        this.lblPrintDate.Text    = DateTime.Now.ToShortDateString();
        this.hdnProjectCode.Value = model.procode;
        this.hdGuid.Value         = model.orid;
        this.hdImg.Value          = model.writeName;

        this.hdflowstate.Value    = model.flowstate.ToString();
        this.lblTerasuryName.Text = this.treasury.GetModel(model.tcode).tname;
        string equipmentId = model.EquipmentId;

        if (!string.IsNullOrEmpty(equipmentId))
        {
            EquEquipmentService equEquipmentService = new EquEquipmentService();
            EquEquipment        byId = equEquipmentService.GetById(equipmentId);
            if (byId != null)
            {
                this.lblEquCode.Text = byId.EquCode;
            }
        }
        List <OutStockModel> listArray = this.outStockBll.GetListArray(" where orcode='" + model.orcode + "'");
        string text = "";

        foreach (OutStockModel current in listArray)
        {
            text = text + "'" + current.scode + "',";
        }
        if (text != "")
        {
            text = text.Substring(0, text.Length - 1);
        }
        this.ViewState["DataTable"] = this.outStockBll.GetTableByOrcode(model.orcode, model.tcode);
        this.BindGv();
        this.FileLink1.MID  = 1804;
        this.FileLink1.FID  = this.hdGuid.Value;
        this.FileLink1.Type = 1;
    }