Example #1
0
        private void Del()
        {
            string code = HttpContext.Current.Request["id"].ToString();
            DepFactory bll = new DepFactory();

            HttpContext.Current.Response.Write(bll.Del(code));
        }
Example #2
0
        private void GetMagList()
        {
            string sql = "";
            int iStart = 0;
            try
            {
                iStart = int.Parse(HttpContext.Current.Request["pageIndex"].ToString()) * int.Parse(HttpContext.Current.Request["pageSize"].ToString());
            }
            catch { }
            int iLimit = 20;
            try
            {
                iLimit = int.Parse(HttpContext.Current.Request["pageSize"].ToString());
            }
            catch { }

            string DepName = string.Empty;
            try
            {
                DepName = HttpContext.Current.Request["DepName"].ToString();
            }
            catch
            { }
            if (!string.IsNullOrEmpty(DepName))
            {
                sql += "and DepName like '%" + DepName + "%' ";
            }
            string IsEnable = string.Empty;
            try
            {
                IsEnable = HttpContext.Current.Request["IsEnable"].ToString();
            }
            catch
            { }
            if (!string.IsNullOrEmpty(IsEnable))
            {
                sql += "and IsEnable = '" + IsEnable + "' ";
            }

            DepFactory bll = new DepFactory();
            HttpContext.Current.Response.Write(bll.GetMagList(sql, iStart, iLimit));
        }
Example #3
0
        private void SaveDepInfo()
        {
            string json = string.Empty;
            try
            {
                json = HttpContext.Current.Request["json"].ToString();
            }
            catch { }
            if (string.IsNullOrEmpty(json))
            {
                HttpContext.Current.Response.Write(JsonMessage.FailString("参数丢失!"));
                return;
            }

            Sys_Department table = JsonHelper.DeserializeData<Sys_Department>(json);
            DepFactory bll = new DepFactory();
            HttpContext.Current.Response.Write(bll.SaveDepInfo(table));
        }
Example #4
0
 private void GetParentDep4Eidt()
 {
     DepFactory bll = new DepFactory();
     string json = bll.GetParentDep4Eidt();
     HttpContext.Current.Response.Write(json);
 }