Exemple #1
0
        private void DoSelect()
        {
            if (op != "c" && op != "cs")
            {
                if (!String.IsNullOrEmpty(id))
                {
                    ent = ExamineStage.Find(id);
                }
                SetFormData(ent);
                sql = @"select A.*,B.BeUserNames,B.UpLevelUserNames,B.SameLevelUserNames,B.DownLevelUserNames,B.RelationName,
                C.IndicatorName from BJKY_Examine..ExamineStageDetail as A 
                left join BJKY_Examine..DeptExamineRelation as B on A.ExamineRelationId=B.Id
                left join BJKY_Examine..ExamineIndicator as C on C.Id=A.ExamineIndicatorId
                where A.ExamineStageId='" + id + "'";
                PageState.Add("DataList", DataHelper.QueryDictList(sql));
            }
            if (op == "c")
            {
                var obj = new
                {
                    ExamineType    = ExamineType,
                    LaunchUserName = UserInfo.Name,
                    LaunchUserId   = UserInfo.UserID
                };
                SetFormData(obj);
            }
            sql = @"select Id,GroupName  from BJKY_Examine..PersonConfig 
                      where (ClerkIds like '%{0}%' or SecondLeaderIds like '%{0}%' or FirstLeaderIds like '%{0}%') and (GroupType='职能服务部门' or GroupType='经营目标单位')";
            sql = string.Format(sql, UserInfo.UserID);
            EasyDictionary dic1 = DataHelper.QueryDict(sql, "Id", "GroupName");

            PageState.Add("enumDept", dic1);
            PageState.Add("EnumYear", SysEnumeration.GetEnumDict("Year"));
        }
Exemple #2
0
        /// <summary>
        ///  基本津贴
        /// </summary>
        /// <param name="workno">工号</param>
        /// <returns></returns>
        public string GetTravelBaseMoney(string workno)
        {
            EasyDictionary DicBase       = SysEnumeration.GetEnumDict("WorkYearMoney");
            string         BaseMoney_One = DicBase["<1年"] + "";
            string         BaseMoney_two = DicBase[">1年"] + "";

            string sql = @"select  WorkMoney As Total
		                    from
		                    (
			                    select  top 1
				                case 
					                when  charindex('正式工',psnclassname)>0 and year(Indutydate)>1 then {2}
					               else {1}
				                end As WorkMoney ,
                                psnclassname
			                    from FL_PortalHR..sysuser As A  
				                    left join HR_OA_MiddleDB..fld_rylb As B
				                on B.pk_fld_rylb=A.Pk_rylb 
			                    where workno='{0}'
		                    ) As T"        ;

            sql = string.Format(sql, workno, BaseMoney_One.Replace("NULL", "0"), BaseMoney_two);
            sql = sql.Replace("HR_OA_MiddleDB", Global.HR_OA_MiddleDB);
            sql = sql.Replace("FL_PortalHR", Global.AimPortalDB);
            return(DataHelper.QueryValue(sql) + "");
        }
Exemple #3
0
        /// <summary>
        /// 查询
        /// </summary>
        private void DoSelect()
        {
            EasyDictionary dic = SysEnumeration.GetEnumDict("EmpAppeal");

            dic.Add("%%", "请选择...");
            PageState.Add("AppealTypeName", dic);


            //问卷角色或管理员
            CommPowerSplit Role = new CommPowerSplit();

            if (Role.IsAppealRole(UserInfo.UserID, UserInfo.LoginName))
            {
                ents = UsrAppealList.FindAll(SearchCriterion);
                this.PageState.Add("UsrAppealListList", ents);
            }
            else
            {
                StringBuilder strb = new StringBuilder();
                if (Session["CompanyId"] != null)           //判断公司登陆
                {
                    SearchCriterion.SetSearch(UsrAppealList.Prop_CompanyId, Session["CompanyId"]);
                    ents = UsrAppealList.FindAll(SearchCriterion);
                    this.PageState.Add("UsrAppealListList", ents);
                }
                else
                {
                    var UsrEnt = SysUser.Find(UserInfo.UserID);
                    SearchCriterion.SetSearch(UsrAppealList.Prop_CompanyId, UsrEnt.Pk_corp);
                    ents = UsrAppealList.FindAll(SearchCriterion);
                    this.PageState.Add("UsrAppealListList", ents);
                }
            }
        }
        private void DoSelect()
        {
            string where = "";
            foreach (CommonSearchCriterionItem item in SearchCriterion.Searches.Searches)
            {
                if (!String.IsNullOrEmpty(item.Value.ToString()))
                {
                    switch (item.PropertyName)
                    {
                    case "StartTime":
                        where += " and CreateTime>='" + item.Value + "' ";
                        break;

                    case "EndTime":
                        where += " and CreateTime<='" + (item.Value.ToString()).Replace(" 0:00:00", " 23:59:59") + "' ";
                        break;

                    default:
                        where += " and A." + item.PropertyName + " like '%" + item.Value + "%' ";
                        break;
                    }
                }
            }
            sql = @"select A.*,(select top 1 ApprovalNodeName from task where Status='0' and PatIndex('%'+A.Id+'%',EFormName)>0) as ApprovalNodeName
            from BJKY_IntegratedManage..AbsenceApply as A where (A.CreateId='{0}' or A.ApplyUserId='{0}')" + where;
            sql = string.Format(sql, UserInfo.UserID);
            PageState.Add("DataList", GetPageData(sql, SearchCriterion));
            PageState.Add("WorkFlowState", SysEnumeration.GetEnumDict("WorkFlowState"));
        }
        private void DoSelect()
        {
            string where = "";
            foreach (CommonSearchCriterionItem item in SearchCriterion.Searches.Searches)
            {
                if (!String.IsNullOrEmpty(item.Value.ToString()))
                {
                    switch (item.PropertyName)
                    {
                    case "BeginDate":
                        where += " and ReceiveDate>='" + item.Value + "' ";
                        break;

                    case "EndDate":
                        where += " and ReceiveDate<='" + (item.Value.ToString()).Replace(" 0:00:00", " 23:59:59") + "' ";
                        break;

                    default:
                        where += " and " + item.PropertyName + " like '%" + item.Value + "%' ";
                        break;
                    }
                }
            }
            sql = @"select *,(ReceiveWord+ReceiveWordSize) as ReceiveToltalNo,len(MainFile)/37 as MainQuan,len(Attachment)/37 as AttachmentQuan
            from BJKY_IntegratedManage..ReceiveDocument where CreateId='{0}'" + where;
            sql = string.Format(sql, UserInfo.UserID);
            PageState.Add("DataList", GetPageData(sql, SearchCriterion));
            PageState.Add("WorkFlowState", SysEnumeration.GetEnumDict("WorkFlowState"));
        }
Exemple #6
0
        private void DoSelect()
        {
            string where = "";
            foreach (CommonSearchCriterionItem item in SearchCriterion.Searches.Searches)
            {
                if (!String.IsNullOrEmpty(item.Value.ToString()))
                {
                    switch (item.PropertyName)
                    {
                    case "BeginDate":
                        where += " and CreateTime>='" + item.Value + "' ";
                        break;

                    case "EndDate":
                        where += " and CreateTime<='" + (item.Value.ToString()).Replace(" 0:00:00", " 23:59:59") + "' ";
                        break;

                    default:
                        where += " and " + item.PropertyName + " like '%" + item.Value + "%' ";
                        break;
                    }
                }
            }
            sql = @"select * from BJKY_IntegratedManage..SignRequest where CreateId='{0}'" + where;
            sql = string.Format(sql, UserInfo.UserID);
            PageState.Add("DataList", GetPageData(sql, SearchCriterion));
            PageState.Add("WorkFlowState", SysEnumeration.GetEnumDict("WorkFlowState"));
        }
        private void DoSelect()
        {
            string where = "";
            foreach (CommonSearchCriterionItem item in SearchCriterion.Searches.Searches)
            {
                if (!string.IsNullOrEmpty(item.Value.ToString()))
                {
                    switch (item.PropertyName)
                    {
                    case "StartTime":
                        where += " and StartTime>='" + item.Value + "' ";
                        break;

                    case "EndTime":
                        where += " and EndTime<='" + (item.Value.ToString()).Replace(" 0:00:00", " 23:59:59") + "' ";
                        break;

                    default:
                        where += " and " + item.PropertyName + " like '%" + item.Value + "%'";
                        break;
                    }
                }
            }
            sql = @"select  A.*,B.StageName from BJKY_Examine..CustomIndicator A left join BJKY_Examine..ExamineStage B
            on A.ExamineStageId=B.Id where  A.CreateId='" + UserInfo.UserID + "' ";
            PageState.Add("DataList", GetPageData(sql, SearchCriterion));
            PageState.Add("EnumYear", SysEnumeration.GetEnumDict("Year"));
        }
        private void Doselect()
        {
            EmpVoiceAskQuestion ent = null;

            if (op != "c" && op != "cs")
            {
                if (!String.IsNullOrEmpty(id))
                {
                    ent = EmpVoiceAskQuestion.Find(id);
                }
                this.SetFormData(ent);
            }
            else
            {
                var Ent = SysUser.FindFirstByProperties("UserID", UserInfo.UserID);
                //公司与部门
                string SQL = @"select B.GroupID As CompanyId,B.Name As CompanyName,C.GroupID AS DeptId,C.Name As DeptName
                        from  sysuser As A
	                        left join sysgroup As B
	                        on A.pk_corp=B.groupID
                        left join sysgroup As C
	                        on C.GroupID=A.pk_deptdoc
                        where A.UserID='{0}'";
                SQL = string.Format(SQL, UserInfo.UserID);
                DataTable Dt1 = DataHelper.QueryDataTable(SQL);

                string CompanyName = string.Empty, CompanyId = string.Empty;
                string DeptName = string.Empty, DeptId = string.Empty;

                if (Dt1.Rows.Count > 0)
                {
                    CompanyName = Dt1.Rows[0]["CompanyName"].ToString();
                    CompanyId   = Dt1.Rows[0]["CompanyId"].ToString();
                    DeptId      = Dt1.Rows[0]["DeptId"].ToString();
                    DeptName    = Dt1.Rows[0]["DeptName"].ToString();
                }

                if (Ent != null)
                {
                    var Obj = new
                    {
                        UserId     = Ent.UserID,
                        UserName   = Ent.Name,
                        Sex        = Ent.Sex,
                        Age        = Ent.Wage,
                        WorkNo     = Ent.WorkNo,
                        IndutyData = Ent.Indutydate,

                        CorpName = CompanyName,
                        CorpId   = CompanyId,
                        DeptId   = DeptId,
                        DeptName = DeptName,
                    };
                    this.SetFormData(Obj);
                }
            }

            this.PageState.Add("QuestionEnum", SysEnumeration.GetEnumDict("QuestionType"));
        }
Exemple #9
0
 /// <summary>
 /// 查询
 /// </summary>
 private void DoSelect()
 {
     SearchCriterion.SetSearch("CreateId", UserInfo.UserID);
     SearchCriterion.SetOrder("CreateTime", false);
     ents = EmpVoiceAskQuestion.FindAll(SearchCriterion);
     this.PageState.Add("DataList", ents);
     this.PageState.Add("QuestionEnum", SysEnumeration.GetEnumDict("QuestionType"));
 }
        string type = String.Empty; // 对象类型

        #endregion

        #region ASP.NET 事件

        protected void Page_Load(object sender, EventArgs e)
        {
            string db = ConfigurationManager.AppSettings["ExamineDB"];

            op   = RequestData.Get <string>("op");
            id   = RequestData.Get <string>("id");
            type = RequestData.Get <string>("type");
            int      count = 0;
            Customer ent   = null;

            switch (this.RequestAction)
            {
            case RequestActionEnum.Update:
                ent = this.GetMergedData <Customer>();
                ent.DoUpdate();
                this.SetMessage("修改成功!");
                break;

            case RequestActionEnum.Insert:
            case RequestActionEnum.Create:
                ent = this.GetPostedData <Customer>();
                ent.DoCreate();
                this.SetMessage("新建成功!");
                break;

            case RequestActionEnum.Delete:
                ent = this.GetTargetData <Customer>();
                ent.DoDelete();
                this.SetMessage("删除成功!");
                return;

            default:
                if (RequestActionString == "VerificationCode")
                {
                    string Code = RequestData.Get <string>("code");
                    count = DataHelper.QueryValue <int>("select count(1) from " + db + "..Customers where Code='" + Code + "' and Id<>'" + id + "'");
                    if (count > 0)
                    {
                        PageState.Add("error", "该客户重复");
                    }
                }
                break;
            }

            if (op != "c" && op != "cs")
            {
                if (!String.IsNullOrEmpty(id))
                {
                    ent = Customer.Find(id);
                }
                this.SetFormData(ent);
            }

            PageState.Add("CustomImportant", SysEnumeration.GetEnumDict("CustomImportant"));
            PageState.Add("CustomType", SysEnumeration.GetEnumDict("CustomType"));
        }
Exemple #11
0
 private void DoSelect()
 {
     sql = @"select * from BJKY_Examine..ExamineIndicator where BelongDeptId in
        (select  Id from BJKY_Examine..PersonConfig 
         where (ClerkIds like '%{0}%' or SecondLeaderIds like '%{0}%' or FirstLeaderIds like '%{0}%') and 
         (GroupType='职能服务部门' or GroupType='经营目标单位'))";
     sql = string.Format(sql, UserInfo.UserID);
     PageState.Add("DataList", GetPageData(sql, SearchCriterion));
     PageState.Add("BeRoleName", SysEnumeration.GetEnumDict("BeExamineObject")); //被考核
 }
Exemple #12
0
        /// <summary>
        /// 查询
        /// </summary>
        private void DoSelect()
        {
            SearchCriterion.SetSearch(UsrAppealList.Prop_UserId, UserInfo.UserID);
            ents = UsrAppealList.FindAll(SearchCriterion);
            this.PageState.Add("UsrAppealListList", ents);

            EasyDictionary dic = SysEnumeration.GetEnumDict("EmpAppeal");

            dic.Add("%%", "请选择...");
            PageState.Add("AppealTypeName", dic);
        }
Exemple #13
0
        /// <summary>
        /// 获取服务年限+基本津贴
        /// </summary>
        /// <param name="workno">工号</param>
        /// <returns></returns>
        public string GetTravelAllMoney(string workno)
        {
            EasyDictionary Dic = SysEnumeration.GetEnumDict("BaseMoney");

            string One   = Dic[">1<5"] + "";
            string Two   = Dic[">=5<10"] + "";
            string Three = Dic[">=10<15"] + "";
            string Four  = Dic[">=15<20"] + "";

            EasyDictionary LimitDate    = SysEnumeration.GetEnumDict("TravelLimitDate");
            string         limitDateStr = string.Empty;

            if ((LimitDate["LimitDate"] + "").ToUpper() == "2L") //2 月最后一天
            {
                limitDateStr = "'" + GetLastDayOfMonth(DateTime.Now.Year, 2).ToString("yyyy-MM-dd") + "'";
            }
            else
            {
                string prefix = LimitDate["LimitDate"] + "";
                limitDateStr = "'" + DateTime.Now.Year + "-" + prefix + "'";
            }

            EasyDictionary DicBase       = SysEnumeration.GetEnumDict("WorkYearMoney");
            string         BaseMoney_One = DicBase["<1年"] + "";
            string         BaseMoney_two = DicBase[">1年"] + "";

            string sql = @"select YearMoney + WorkMoney As Total
		                    from
		                    (
			                    select  top 1
				                case 
				                    when 1<datediff(year, Indutydate,getdate())and datediff(year,Indutydate,getdate())<5 then {1}  
				                    when 5<=datediff(year,Indutydate,getdate())and datediff(year,Indutydate,getdate())<10 then {2}   
				                    when 10<=datediff(year,Indutydate,getdate())and datediff(year,Indutydate,getdate())<15 then {3}   
				                    when 15<=datediff(year,Indutydate,getdate())and datediff(year,Indutydate,getdate())<20 then {4} 
				                    else 0
				                end  As YearMoney,
				                case 
					                when  charindex('正式工',psnclassname)>0 and year(Indutydate)>1 then {6}
					               else {5}
				                end As WorkMoney ,
                                psnclassname
			                    from FL_PortalHR..sysuser As A  
				                    left join HR_OA_MiddleDB..fld_rylb As B
				                on B.pk_fld_rylb=A.Pk_rylb 
			                    where workno='{0}'
		                    ) As T"        ;

            sql = sql.Replace("getdate()", limitDateStr);
            sql = string.Format(sql, workno, One, Two, Three, Four, BaseMoney_One.Replace("NULL", "0"), BaseMoney_two);
            sql = sql.Replace("HR_OA_MiddleDB", Global.HR_OA_MiddleDB);
            sql = sql.Replace("FL_PortalHR", Global.AimPortalDB);
            return(DataHelper.QueryValue(sql) + "");
        }
Exemple #14
0
        private void DoSelect()
        {
            SetFormData(ent);
            PageState.Add("ProductType", SysEnumeration.GetEnumDict("ProductType"));
            PageState.Add("Unit", SysEnumeration.GetEnumDict("Unit"));
            sql = @"select A.*,B.Name,B.Code,B.Isbn from SHHG_AimExamine..ProductsPart as A
                left join SHHG_AimExamine..Products as B on A.CId=B.Id  where PId='" + id + "'";
            IList <EasyDictionary> dics = DataHelper.QueryDictList(sql);

            PageState.Add("DetailList", dics);
        }
Exemple #15
0
 private void DoSelect()
 {
     if (string.IsNullOrEmpty(ExamineIndicatorId))
     {
         return;
     }
     SearchCriterion.SetSearch(IndicatorFirst.Prop_ExamineIndicatorId, ExamineIndicatorId);
     SearchCriterion.SetOrder("SortIndex", true);
     ents = IndicatorFirst.FindAll(SearchCriterion);
     PageState.Add("DataList", ents);
     PageState.Add("BeRoleName", SysEnumeration.GetEnumDict("BeExamineObject")); //被考核
 }
Exemple #16
0
 private void DoSelect()
 {
     if (!string.IsNullOrEmpty(id))
     {
         string sql = @"select A.* from SHHG_AimExamine..OtherInWarehouseDetail as A
         where A.InWarehouseId='{0}' order by ProductCode";
         sql = string.Format(sql, id);
         IList <EasyDictionary> podDics = DataHelper.QueryDictList(sql);
         PageState.Add("DetailList", podDics);
     }
     PageState.Add("InWarehouseType", SysEnumeration.GetEnumDict("InWarehouseType"));
 }
Exemple #17
0
 private void DoSelect()
 {
     if (!string.IsNullOrEmpty(id))
     {
         string sql = @"select A.* from SHHG_AimExamine..PurchaseOrderDetail as A
         where A.PurchaseOrderId='{0}' order by A.Code Asc";
         sql = string.Format(sql, id);
         IList <EasyDictionary> podDics = DataHelper.QueryDictList(sql);
         PageState.Add("DetailList", podDics);
     }
     PageState.Add("ProductType", SysEnumeration.GetEnumDict("ProductType"));
     PageState.Add("PriceType", SysEnumeration.GetEnumDict("PriceType"));
 }
Exemple #18
0
 private void DoSelect()
 {
     if (!string.IsNullOrEmpty(userId))
     {
         sql = @"select UserId,Name as UserName,
         (select top 1 GroupName from BJKY_Examine..PersonConfig where 
         (PatIndex('%'+UserId+'%',FirstLeaderIds)>0 or PatIndex('%'+UserId+'%',SecondLeaderIds)>0 or PatIndex('%'+UserId+'%',ClerkIds)>0) 
         and GroupType in ('经营目标单位','职能服务部门')) as DeptName from BJKY_Portal..SysUser where UserId='{0}'";
         sql = string.Format(sql, userId);
         PageState.Add("DataList", DataHelper.QueryDictList(sql));
     }
     if (!string.IsNullOrEmpty(deptId))
     {
         sql = @"select UserId,Name as UserName,(select top 1 GroupName from BJKY_Examine..PersonConfig where Id='{0}') as DeptName
         from BJKY_Portal..SysUser where PatIndex('%'+UserId+'%', 
         (select top 1 FirstLeaderIds+','+SecondLeaderIds+','+convert(varchar(8000),ClerkIds) from BJKY_Examine..PersonConfig where Id='{0}'))>0";
         sql = string.Format(sql, deptId);
         PageState.Add("DataList", DataHelper.QueryDictList(sql));
     }
     if (!string.IsNullOrEmpty(id))// top 1,'{0}' as UserId,
     {
         ent = IntegratedMessage.Find(id);
         SetFormData(ent);
         if (ent.SubmitState == "1")//已发送
         {
             sql = @"select top 1 GroupName as DeptName,'{0}' as UserId,
             (select top 1 Name from SysUser where UserId='{0}') as UserName from BJKY_Examine..PersonConfig where 
             (PatIndex('%{0}%',FirstLeaderIds)>0 or PatIndex('%{0}%',SecondLeaderIds)>0 or PatIndex('%{0}%',ClerkIds)>0) and 
             GroupType in ('经营目标单位','职能服务部门')";
             sql = string.Format(sql, ent.ReceiverId);
             PageState.Add("DataList", DataHelper.QueryDictList(sql));
         }
         else
         {
             if (!string.IsNullOrEmpty(ent.ReceiverIds))//未发送的消息有可能没有指定接收人
             {
                 sql = @"select UserID as UserId ,Name as UserName, 
                 (select top 1 GroupName from BJKY_Examine..PersonConfig
                 where (PatIndex('%'+UserId+'%',FirstLeaderIds)>0 or PatIndex('%'+UserId+'%',SecondLeaderIds)>0 
                 or PatIndex('%'+UserId+'%',ClerkIds)>0) and GroupType in ('经营目标单位','职能服务部门')) as DeptName
                 from SysUser where PatIndex('%'+UserId+'%','{0}')>0";
                 sql = string.Format(sql, ent.ReceiverIds);
                 PageState.Add("DataList", DataHelper.QueryDictList(sql));
             }
         }
         string sql1 = @"select * from BJKY_Portal..FileItem where PatIndex('%'+Id+'%','{0}')>0";
         sql1 = string.Format(sql1, ent.Attachment);
         PageState.Add("FileList", DataHelper.QueryDictList(sql1));
     }
     PageState.Add("MessageType", SysEnumeration.GetEnumDict("MessageType"));
 }
 private void DoSelect()
 {
     if (!string.IsNullOrEmpty(id))
     {
         string sql = @"select A.*,(A.Quantity-SHHG_AimExamine.dbo.fun_ActuallyHaveInQuantity(A.Id,B.InWarehouseType)) as NoInQuan
         from SHHG_AimExamine..OtherInWarehouseDetail as A
         left join SHHG_AimExamine..InWarehouse as B on B.Id=A.InWarehouseId
         where A.InWarehouseId='{0}' order by ProductCode";
         sql = string.Format(sql, id);
         IList <EasyDictionary> podDics = DataHelper.QueryDictList(sql);
         PageState.Add("DetailList", podDics);
     }
     PageState.Add("InWarehouseType", SysEnumeration.GetEnumDict("InWarehouseType"));
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            SearchCriterion.SetOrder("BlockType");
            if (!string.IsNullOrEmpty(this.RequestData.Get <string>("BlockType")))
            {
                ents = WebPartRule.FindAll(SearchCriterion, Expression.Eq("BlockType", this.RequestData.Get <string>("BlockType")));
            }
            else
            {
                ents = WebPartRule.FindAll(SearchCriterion, Expression.Eq("BlockType", "portal"));
            }

            this.PageState.Add("WebPartList", ents);
            this.PageState.Add("BlockType", SysEnumeration.GetEnumDict("BlockType"));

            Aim.Portal.Model.WebPart ent = null;
            switch (this.RequestAction)
            {
            case RequestActionEnum.Insert:
                ent = this.GetPostedData <Aim.Portal.Model.WebPart>();
                ent.Create();
                this.SetMessage("新建成功!");
                break;

            case RequestActionEnum.Update:
                ent = this.GetMergedData <Aim.Portal.Model.WebPart>();
                ent.Update();
                this.SetMessage("保存成功!");
                break;

            case RequestActionEnum.Delete:
                ent = this.GetTargetData <Aim.Portal.Model.WebPart>();
                ent.Delete();
                this.SetMessage("删除成功!");
                break;

            case RequestActionEnum.Custom:
                IList <object> idList = RequestData.GetList <object>("IdList");

                if (idList != null && idList.Count > 0)
                {
                    if (RequestActionString == "batchdelete")
                    {
                        WebPartRule.BatchRemoveByPrimaryKeys(idList);
                    }
                }
                break;
            }
        }
Exemple #21
0
 private void DoSelect()
 {
     if (op != "c" && op != "cs")
     {
         ent = Vedio.Find(id);
         SetFormData(ent);
         sql = @"select * from FileItem where Id='{0}'";
         sql = string.Format(sql, ent.VedioFile);
         PageState.Add("DataList", DataHelper.QueryDictList(sql));
         sql = @"select * from FileItem where PatIndex('%'+Id+'%','{0}')>0";
         sql = string.Format(sql, ent.ImageFile);
         PageState.Add("ImageList", DataHelper.QueryDictList(sql));
     }
     PageState.Add("VedioType", SysEnumeration.GetEnumDict("VedioType"));
 }
Exemple #22
0
        private void DoSelect()
        {
            string sql = "";

            string where = string.Empty;
            foreach (CommonSearchCriterionItem item in SearchCriterion.Searches.Searches)
            {
                if (item.Value.ToString() != "")
                {
                    where += " and " + item.PropertyName + " like '%" + item.Value + "%'";
                }
            }
            sql = @"select * from SHHG_AimExamine..Products where 1=1" + where;
            PageState.Add("ProductList", GetPageData(sql, SearchCriterion));
            PageState.Add("ProductTypeEnum", SysEnumeration.GetEnumDict("ProductType"));
        }
        private void DoSelect()
        {
            IList <ExamineRelation> ents = null;

            if (!string.IsNullOrEmpty(id))
            {
                ents = ExamineRelation.FindAllByProperty("Id", id);
            }
            else
            {
                ents = ExamineRelation.FindAll(SearchCriterion);
            }
            PageState.Add("DataList", ents);
            PageState.Add("BeRoleName", SysEnumeration.GetEnumDict("BeExamineObject"));                                                  //被考核
            PageState.Add("ToRoleName", SysEnumeration.FindAllByProperty(SysEnumeration.Prop_Code, "ExamineObject").First().ChildNodes); //多选下拉框
        }
Exemple #24
0
        private void DoSelect()
        {
            string where = string.Empty;
            foreach (CommonSearchCriterionItem item in SearchCriterion.Searches.Searches)
            {
                if (!string.IsNullOrEmpty(item.Value.ToString()))
                {
                    where += " and " + item.PropertyName + " like '%" + item.Value + "%'";
                }
            }
            string sql = @"select * from SHHG_AimExamine..Products where 1=1" + where;
            IList <EasyDictionary> dics = GetPageData(sql, SearchCriterion);

            PageState.Add("DataList", dics);
            PageState.Add("ProductTypeEnum", SysEnumeration.GetEnumDict("ProductType"));
        }
 private void DoSelect()
 {
     if (op != "c" && op != "cs")
     {
         if (!String.IsNullOrEmpty(id))
         {
             ent = PaymentInvoice.Find(id);
         }
     }
     else
     {
         ent = new PaymentInvoice();
     }
     SetFormData(ent);
     PageState.Add("PayType", SysEnumeration.GetEnumDict("PayType"));
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            Aim.Portal.Model.WebPart usr = null;

            switch (this.RequestAction)
            {
            case RequestActionEnum.Update:
                usr = this.GetMergedData <Aim.Portal.Model.WebPart>();
                usr.SaveAndFlush();
                this.SetMessage("修改成功!");
                break;

            case RequestActionEnum.Insert:
            case RequestActionEnum.Create:
            case RequestActionEnum.Copy:
                usr          = this.GetPostedData <Aim.Portal.Model.WebPart>();
                usr.IsHidden = "0";
                usr.CreateAndFlush();
                if (RequestAction == RequestActionEnum.Copy)
                {
                    this.SetMessage("复制成功!");
                }
                else
                {
                    this.SetMessage("新建成功!");
                }
                break;

            case RequestActionEnum.Delete:
                usr = this.GetTargetData <Aim.Portal.Model.WebPart>();
                usr.DeleteAndFlush();
                this.SetMessage("删除成功!");
                return;

                break;

            case RequestActionEnum.Default:
                break;
            }

            if (this.Request["Id"] != null)
            {
                Aim.Portal.Model.WebPart user = Aim.Portal.Model.WebPart.Find(this.Request["Id"]);
                this.SetFormData(user);
            }
            this.PageState.Add("BlockType", SysEnumeration.GetEnumDict("BlockType"));
        }
 private void DoSelect()
 {
     if (op == "c")
     {
         if (!String.IsNullOrEmpty(ExamYearResultId))
         {
             ExamYearResult       eyrEnt  = ExamYearResult.Find(ExamYearResultId);
             ExamineStage         esEnt   = ExamineStage.Find(eyrEnt.ExamineStageId);
             IList <PersonConfig> pcEnts1 = PersonConfig.FindAllByProperty("GroupCode", "HRAppealAcceptor");
             IList <PersonConfig> pcEnts2 = PersonConfig.FindAllByProperty("GroupCode", "HRAppealCharger");
             IList <PersonConfig> pcEnts3 = PersonConfig.FindAllByProperty("Id", eyrEnt.DeptId);
             var obj = new
             {
                 ExamYearResultId = ExamYearResultId,
                 ExamineStageId   = eyrEnt.ExamineStageId,
                 ExamineType      = esEnt.ExamineType,
                 AppealUserId     = eyrEnt.UserId,
                 AppealUserName   = eyrEnt.UserName,
                 OriginalScore    = eyrEnt.ApproveScore.HasValue ? eyrEnt.ApproveScore : eyrEnt.IntegrationScore,
                 OriginalLevel    = String.IsNullOrEmpty(eyrEnt.ApproveLevel) ? eyrEnt.ApproveLevel : eyrEnt.AdviceLevel,
                 //有可能是部门级考核 没有角色编号和角色名称
                 BeRoleCode     = !string.IsNullOrEmpty(eyrEnt.BeRoleCode) ? eyrEnt.BeRoleCode : "",
                 BeRoleName     = !string.IsNullOrEmpty(eyrEnt.BeRoleCode) ? SysEnumeration.FindAllByProperty(SysEnumeration.Prop_Code, eyrEnt.BeRoleCode).First <SysEnumeration>().Name : "",
                 DeptId         = eyrEnt.DeptId,
                 DeptName       = eyrEnt.DeptName,
                 AppealTime     = System.DateTime.Now.ToShortDateString(),
                 AcceptUserId   = pcEnts1.Count > 0 ? pcEnts1[0].ClerkIds.Replace(",", "") : "",
                 AcceptUserName = pcEnts1.Count > 0 ? pcEnts1[0].ClerkNames : "",
                 DeptLeaderId   = pcEnts3.Count > 0 ? pcEnts3[0].FirstLeaderIds.Replace(",", "") : "",
                 DeptLeaderName = pcEnts3.Count > 0 ? pcEnts3[0].FirstLeaderNames : "",
                 HrUserId       = pcEnts2.Count > 0 ? pcEnts2[0].ClerkIds.Replace(",", "") : "",
                 HrUserName     = pcEnts2.Count > 0 ? pcEnts2[0].ClerkNames : ""
             };
             SetFormData(obj);
         }
     }
     else
     {
         if (!string.IsNullOrEmpty(id))
         {
             ent = ExamineAppeal.Find(id);
             SetFormData(ent);
         }
     }
     PageState.Add("ExamineLevel", SysEnumeration.GetEnumDict("ExamineLevel"));
 }
Exemple #28
0
        private void DoSelect()
        {
            string where = "";
            int times = 0;

            foreach (CommonSearchCriterionItem item in SearchCriterion.Searches.Searches)
            {
                if (!string.IsNullOrEmpty(item.Value.ToString()))
                {
                    switch (item.PropertyName)
                    {
                    case "StartYear":
                        where += " and A.Year>=" + item.Value + " ";
                        break;

                    case "EndYear":
                        where += " and A.Year<=" + item.Value + " ";
                        break;

                    case "Times":
                        times = Convert.ToInt32(item.Value);
                        break;

                    case "IntegrationScore":
                        where += " and A." + item.PropertyName + " >=" + item.Value + " ";
                        break;

                    default:
                        where += " and A." + item.PropertyName + " like '%" + item.Value + "%'";
                        break;
                    }
                }
            }
            if (times > 0)
            {
                sql = @"select A.* from BJKY_Examine..ExamYearResult as A where 1=1" + where + " and (Select count(B.Id) from BJKY_Examine..ExamYearResult as B where UserId=A.UserId " + where.Replace("A.", "B.") + ")>=" + times;
            }
            else
            {
                sql = @"select * from BJKY_Examine..ExamYearResult as A where 1=1" + where;
            }
            PageState.Add("DataList", GetPageData(sql, SearchCriterion));
            PageState.Add("EnumYear", SysEnumeration.GetEnumDict("Year"));
            PageState.Add("EnumLevel", SysEnumeration.GetEnumDict("ExamineLevel"));
        }
        private void DoSelect()
        {
            if (op != "c" && op != "cs")
            {
                sql = @"select * from Task where PatIndex('%{0}%',EFormName)>0  and Status='4' and Ext1 is null order by FinishTime asc";
                sql = string.Format(sql, id);
                IList <EasyDictionary> taskDics = DataHelper.QueryDictList(sql);
                PageState.Add("Opinion", taskDics);
                sql = @"select * from BJKY_Portal..FileItem where PatIndex('%'+Id+'%','{0}')>0 ";
                sql = string.Format(sql, ent.Attachment);
                PageState.Add("DataList", DataHelper.QueryDictList(sql));
            }
            else
            {
                sql = @"select top 1 case [Type] when 3 then ParentDeptName when 2 then ChildDeptName end as DeptName,
                case [Type] when 3 then ParentId when 2 then DeptId end as DeptId
                from View_SysUserGroup where UserId='{0}'";
                sql = string.Format(sql, UserInfo.UserID);
                IList <EasyDictionary> deptDics = DataHelper.QueryDictList(sql);
                ent = new SignRequest();
                if (deptDics.Count > 0)
                {
                    ent.CreateDeptId   = deptDics[0].Get <string>("DeptId");
                    ent.CreateDeptName = deptDics[0].Get <string>("DeptName");
                }
                ent.ContactUserId   = UserInfo.UserID;
                ent.ContactUserName = UserInfo.Name;
                ent.CreateId        = UserInfo.UserID;
                ent.CreateName      = UserInfo.Name;
            }
            SetFormData(ent);
            string taskId = RequestData.Get <string>("TaskId");

            if (!string.IsNullOrEmpty(taskId))
            {
                Task tEnt = Task.Find(taskId);
                if (tEnt.Status != 4 && !string.IsNullOrEmpty(tEnt.Description))
                {
                    PageState.Add("UnSubmitOpinion", tEnt.Description);
                }
            }
            PageState.Add("SecrecyDegree", SysEnumeration.GetEnumDict("SecrecyDegree"));
            PageState.Add("ImportanceDegree", SysEnumeration.GetEnumDict("ImportanceDegree"));
        }
        private void DoSelect()
        {
            //维护验证
            string auth = @"select Id from BJKY_IntegratedManage..IntegratedConfig  where  patindex('%{0}%',VedioMaintenanceId)>0";

            auth = string.Format(auth, UserInfo.UserID);
            if (DataHelper.QueryValue(auth) != null)
            {
                this.PageState.Add("authState", "true");
            }

            string where = "";
            foreach (CommonSearchCriterionItem item in SearchCriterion.Searches.Searches)
            {
                if (!String.IsNullOrEmpty(item.Value.ToString()))
                {
                    switch (item.PropertyName)
                    {
                    case "BeginDate":
                        where += " and A.CreateTime>='" + item.Value + "' ";
                        break;

                    case "EndDate":
                        where += " and A.CreateTime<='" + (item.Value.ToString()).Replace(" 0:00:00", " 23:59:59") + "' ";
                        break;

                    default:
                        if (item.PropertyName == "VedioType" && item.Value.ToString() == "全部")
                        {
                            break;
                        }
                        else
                        {
                            where += " and A." + item.PropertyName + " like '%" + item.Value + "%' ";
                        }
                        break;
                    }
                }
            }
            sql = @"select A.*,B.Name from BJKY_IntegratedManage..Vedio as A left join BJKY_Portal..FileItem as B on A.VedioFile=B.Id
            where 1=1" + where;
            PageState.Add("DataList", GetPageData(sql, SearchCriterion));
            PageState.Add("VedioType", SysEnumeration.GetEnumDict("VedioType"));
        }