Ejemplo n.º 1
0
        /// <summary>
        /// 获取费用分配数据底层调用
        /// </summary>
        /// <param name="CurrorPage"></param>
        /// <param name="PageSize"></param>
        /// <param name="Total"></param>
        /// <param name="sortStr"></param>
        /// <param name="condition"></param>
        /// <param name="DataID"></param>
        /// <returns></returns>
        public static DataTable FindByPage(int CurrorPage, int PageSize, out int Total, string sortStr, Cost_PerCondition condition, string DataID = null)
        {
            SqlParameter[] sqlParas = new SqlParameter[] {
                new SqlParameter("@SourceID ", SqlDbType.VarChar, 100)
                , new SqlParameter("@LangType", SqlDbType.VarChar, 20)
                , new SqlParameter("@Sect_RID", SqlDbType.VarChar, 50)
                , new SqlParameter("@Emp_No", SqlDbType.VarChar, 10)
                , new SqlParameter("@Effect_Date", SqlDbType.VarChar, 20)
                , new SqlParameter("@Effect_Date_To", SqlDbType.VarChar, 20)
                , new SqlParameter("@CursorPage", SqlDbType.Int)
                , new SqlParameter("@PageSize", SqlDbType.Int)
                , new SqlParameter("@SortStr", SqlDbType.NVarChar, 200)
                , new SqlParameter("@DataID", SqlDbType.VarChar, 50)
                , new SqlParameter("@CheckDate", SqlDbType.VarChar, 20)
                , new SqlParameter("@ActiveVal", SqlDbType.VarChar, 10)
            };

            sqlParas[0].Value  = "getPagerData";
            sqlParas[1].Value  = "CN";                     // LangType;
            sqlParas[2].Value  = condition.Sect_RID_Value; // this.SelectTree.GetItem("value");
            sqlParas[3].Value  = condition.Emp_No;
            sqlParas[4].Value  = condition.Effect_DateFrom;
            sqlParas[5].Value  = condition.Effect_DateTo;
            sqlParas[6].Value  = CurrorPage;
            sqlParas[7].Value  = PageSize;
            sqlParas[8].Value  = sortStr;
            sqlParas[9].Value  = DataID;
            sqlParas[10].Value = condition.CheckDate;
            sqlParas[11].Value = condition.ActiveVal;
            DataSet   ds = SQlHelper.ExecuteToDataSet("p_HRIS424SearchData", CommandType.StoredProcedure, sqlParas);
            DataTable dt = ds.Tables[1];

            Total = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
            return(dt);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 从工号得到组织架构和职位
        /// </summary>
        /// <param name="httpContext"></param>
        /// <returns></returns>
        public static string GetorganizationLevelEmp_No(HttpContext httpContext)
        {
            String keyword = httpContext.Request["keyword"];
            string sJSON2  = String.Empty;

            SqlParameter[] sqlParas = new SqlParameter[] {
                new SqlParameter("@SourceID", SqlDbType.VarChar, 100)
                , new SqlParameter("@LangType", SqlDbType.VarChar, 20)
                , new SqlParameter("@Keyword", SqlDbType.NVarChar, 200)
                , new SqlParameter("@Keyword1", SqlDbType.NVarChar, 200)
                , new SqlParameter("@Keyword2", SqlDbType.NVarChar, 200)
                , new SqlParameter("@Keyword3", SqlDbType.NVarChar, 200)
                , new SqlParameter("@Keyword4", SqlDbType.NVarChar, 200)
                , new SqlParameter("@Keyword5", SqlDbType.NVarChar, 200)
            };
            sqlParas[0].Value = "GetorganizationLevelEmp_No";
            sqlParas[1].Value = httpContext.Session["LangType"] ?? "";
            sqlParas[2].Value = keyword;
            DataSet dt = SQlHelper.ExecuteToDataSet("p_HRIS424ControlDataSource", CommandType.StoredProcedure, sqlParas);

            sJSON2 = JsonConvert.SerializeObject(dt.Tables[0]);
            return(sJSON2);
        }