/// <summary>
 /// 根据ID返回 T_FundsRecordEntity实体类 单笔资料 (经费使用申请单)
 /// </summary>
 /// <param name="ID">ID 自增ID</param>
 /// <returns>返回 T_FundsRecordEntity实体类 ID为0则无记录</returns>
 public static T_FundsRecordEntity T_FundsRecordDisp(Int32 ID)
 {
     T_FundsRecordEntity fam = new T_FundsRecordEntity();
     QueryParam qp = new QueryParam();
     qp.PageIndex = 1;
     qp.PageSize = 1;
     qp.Where = string.Format(" Where {0}.{1} = {2}", "T_FundsRecord", "ID", ID);
     int RecordCount = 0;
     List<T_FundsRecordEntity> lst = T_FundsRecordList(qp, out RecordCount);
     if (RecordCount > 0)
     {
         fam = lst[0];
     }
     return fam;
 }
Esempio n. 2
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="ut"></param>
        private void OnStartData(T_FundsRecordEntity ut)
        {
            //Applicant_Disp.Text = UserData.GetUserDate.U_LoginName;
            ProjID_Hidden.Value = ut.ProjID.ToString();
            if (!ut.ProjID.Equals(0))
            {
                ProjID_Disp.Text = BusinessFacadeShanlitech_Location.GetProjectBudgetFormat(BusinessFacadeShanlitech_Location.T_ProjectBudgetDisp(ut.ProjID));
                BalanceAmount_Disp.Text = ut.BalanceAmount.ToString();
                BalanceAmount_Hidden.Value = ut.BalanceAmount.ToString();
                //Applicant_Disp.Text = BusinessFacade.sys_UserDisp(ut.Applicant).U_LoginName;
                Checker_Disp.Text = BusinessFacade.sys_UserDisp(ut.Checker).U_LoginName;
                Approver_Disp.Text = BusinessFacade.sys_UserDisp(ut.Approver).U_LoginName;
            }

            UseRemark_Input.Text = UseRemark_Disp.Text = ut.UseRemark.ToString();
            AdvanceAmount_Input.Text = AdvanceAmount_Disp.Text = ut.AdvanceAmount.ToString();
            TransferState_Disp.Text = BusinessFacadeShanlitech_Location.GetTransferStateNameByState(ut.TransferState);
            if (!string.IsNullOrEmpty(ut.AppricationTime.ToString()))
            {
                AppricationTime_Disp.Text = ut.AppricationTime.ToString();
            }
            else
            {
                AppricationTime_Disp.Text = DateTime.Now.ToString();
            }

            ShenHeState_Disp.Text = ut.ShenHeState;
            PiZhunState_Disp.Text = ut.PiZhunState;
            CunDangState_Disp.Text = ut.CunDangState;
        }
 /// <summary>
 /// 新增/删除/修改 T_FundsRecordEntity (经费使用申请单)
 /// </summary>
 /// <param name="fam">T_FundsRecordEntity实体类</param>
 /// <returns>-1:存储过程执行失败,-2:存在相同的主键,Insert:返回插入自动ID,Update:返回更新记录数,Delete:返回删除记录数</returns>
 public static Int32 T_FundsRecordInsertUpdateDelete(T_FundsRecordEntity fam)
 {
     return DataProvider.Instance().T_FundsRecordInsertUpdateDelete(fam);
 }
Esempio n. 4
0
        /// <summary>
        /// 将记录集转为T_FundsRecordEntity实体类 (经费使用申请单)
        /// </summary>
        /// <param name="dr">记录集</param>
        /// <param name="Fileds">字段名列表</param>
        /// <returns>T_FundsRecordEntity</returns>
        protected T_FundsRecordEntity PopulateT_FundsRecordEntity(IDataReader dr, Dictionary<string, string> Fileds)
        {
            T_FundsRecordEntity nc = new T_FundsRecordEntity();

            if (Fileds.ContainsKey("ID") && !Convert.IsDBNull(dr["ID"])) nc.ID = Convert.ToInt32(dr["ID"]); // 自增ID
            if (Fileds.ContainsKey("ProjID") && !Convert.IsDBNull(dr["ProjID"])) nc.ProjID = Convert.ToInt32(dr["ProjID"]); // 预算项目
            if (Fileds.ContainsKey("BalanceAmount") && !Convert.IsDBNull(dr["BalanceAmount"])) nc.BalanceAmount = Convert.ToDouble(dr["BalanceAmount"]); // 经费余额
            if (Fileds.ContainsKey("UseRemark") && !Convert.IsDBNull(dr["UseRemark"])) nc.UseRemark = Convert.ToString(dr["UseRemark"]).Trim(); // 申请用途
            if (Fileds.ContainsKey("AdvanceAmount") && !Convert.IsDBNull(dr["AdvanceAmount"])) nc.AdvanceAmount = Convert.ToDouble(dr["AdvanceAmount"]); // 支出金额
            if (Fileds.ContainsKey("Applicant") && !Convert.IsDBNull(dr["Applicant"])) nc.Applicant = Convert.ToInt32(dr["Applicant"]); // 申请人
            if (Fileds.ContainsKey("Checker") && !Convert.IsDBNull(dr["Checker"])) nc.Checker = Convert.ToInt32(dr["Checker"]); // 审核人
            if (Fileds.ContainsKey("Approver") && !Convert.IsDBNull(dr["Approver"])) nc.Approver = Convert.ToInt32(dr["Approver"]); // 批准人
            if (Fileds.ContainsKey("TransferState") && !Convert.IsDBNull(dr["TransferState"])) nc.TransferState = Convert.ToInt32(dr["TransferState"]); // 流转状态(0为申请状态,1为审核状态,2为批准状态)
            if (Fileds.ContainsKey("State") && !Convert.IsDBNull(dr["State"])) nc.State = Convert.ToInt32(dr["State"]); // 状态(0为流转状态,1为存档状态,9为删除)
            if (Fileds.ContainsKey("AppricationTime") && !Convert.IsDBNull(dr["AppricationTime"])) nc.AppricationTime = Convert.ToDateTime(dr["AppricationTime"]); // 申请时间
            if (Fileds.ContainsKey("CheckTime") && !Convert.IsDBNull(dr["CheckTime"])) nc.CheckTime = Convert.ToDateTime(dr["CheckTime"]); // 审核时间
            if (Fileds.ContainsKey("ApprovalTime") && !Convert.IsDBNull(dr["ApprovalTime"])) nc.ApprovalTime = Convert.ToDateTime(dr["ApprovalTime"]); // 批准时间
            if (Fileds.ContainsKey("IntegrityCheckCode") && !Convert.IsDBNull(dr["IntegrityCheckCode"])) nc.IntegrityCheckCode = Convert.ToString(dr["IntegrityCheckCode"]).Trim(); // 信息完整性校验码
            if (Fileds.ContainsKey("ShenHeState") && !Convert.IsDBNull(dr["ShenHeState"])) nc.ShenHeState = Convert.ToString(dr["ShenHeState"]).Trim(); // ShenHeState
            if (Fileds.ContainsKey("PiZhunState") && !Convert.IsDBNull(dr["PiZhunState"])) nc.PiZhunState = Convert.ToString(dr["PiZhunState"]).Trim(); // PiZhunState
            if (Fileds.ContainsKey("CunDangState") && !Convert.IsDBNull(dr["CunDangState"])) nc.CunDangState = Convert.ToString(dr["CunDangState"]).Trim(); // CunDangState
            if (Fileds.ContainsKey("note") && !Convert.IsDBNull(dr["note"])) nc.note = Convert.ToString(dr["note"]).Trim(); // note
            return nc;
        }
Esempio n. 5
0
 /// <summary>
 /// 新增/删除/修改 T_FundsRecordEntity (经费使用申请单)
 /// </summary>
 /// <param name="fam">T_FundsRecord实体类</param>
 /// <returns>-1:存储过程执行失败,-2:存在相同的主键,Insert:返回插入自动ID,Update:返回更新记录数,Delete:返回删除记录数</returns>
 public abstract Int32 T_FundsRecordInsertUpdateDelete(T_FundsRecordEntity fam);
Esempio n. 6
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            string Checkbox_Value = (string)Common.sink("Checkbox", MethodType.Post, 2000, 1, DataType.Str);
            string[] Checkbox_Value_Array = Checkbox_Value.Split(',');
            Int32 IDX = 0;
            for (int i = 0; i < Checkbox_Value_Array.Length; i++)
            {
                if (Int32.TryParse(Checkbox_Value_Array[i], out IDX))
                {
                    T_FundsRecordEntity et = new T_FundsRecordEntity();
                    et.DataTable_Action_ = DataTable_Action.Delete;
                    et.ID = IDX;
                    BusinessFacadeShanlitech_Location.T_FundsRecordInsertUpdateDelete(et);
                }
            }

            EventMessage.MessageBox(1, "批量删除成功", string.Format("批量删除({0})成功!", Checkbox_Value), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
        }
Esempio n. 7
0
 /// <summary>
 /// 初始化数据
 /// </summary>
 /// <param name="ut"></param>
 private void OnStartData(T_FundsRecordEntity ut)
 {
 ProjID_Input.Text = ProjID_Disp.Text = ut.ProjID.ToString();
         BalanceAmount_Input.Text = BalanceAmount_Disp.Text = ut.BalanceAmount.ToString();
         UseRemark_Input.Text = UseRemark_Disp.Text = ut.UseRemark.ToString();
         AdvanceAmount_Input.Text = AdvanceAmount_Disp.Text = ut.AdvanceAmount.ToString();
         Applicant_Input.Text = Applicant_Disp.Text = ut.Applicant.ToString();
         Checker_Input.Text = Checker_Disp.Text = ut.Checker.ToString();
         Approver_Input.Text = Approver_Disp.Text = ut.Approver.ToString();
         TransferState_Input.Text = TransferState_Disp.Text = ut.TransferState.ToString();
         State_Input.Text = State_Disp.Text = ut.State.ToString();
         AppricationTime_Input.Text = AppricationTime_Disp.Text = ut.AppricationTime.ToString();
         CheckTime_Input.Text = CheckTime_Disp.Text = ut.CheckTime.ToString();
         ApprovalTime_Input.Text = ApprovalTime_Disp.Text = ut.ApprovalTime.ToString();
         IntegrityCheckCode_Input.Text = IntegrityCheckCode_Disp.Text = ut.IntegrityCheckCode.ToString();
         
 }