Ejemplo n.º 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.ActivityImg> GetList(int pageSize, int pageIndex, string strWhere, string strOrder)
        {
            var db = new DAL.Common();
            var ds = db.GetList("ActivityImg", pageSize, pageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.EquipmentModel> GetList(int pageSize, int pageIndex, string strWhere, string strOrder)
        {
            var db = new DAL.Common();
            var ds = db.GetList("EquipmentModel", pageSize, pageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
        //{
        //return dal.GetList(PageSize,PageIndex,strWhere);
        //}

        #endregion  Method

        /// <summary>
        /// 返回一个数据表  List的前身
        /// </summary>
        public DataTable GetTable(int pageSize, int pageIndex, string strWhere, string strOrder)
        {
            var db = new DAL.Common();
            var ds = db.GetList("UserInfo", pageSize, pageIndex, strWhere, strOrder);

            return(ds.Tables[0]);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.AdminFlag> GetList(string strWhere)
        {
            var db = new DAL.Common();
            var ds = db.GetList("AdminFlag", -1, -1, strWhere, "OrderID asc"); // dal.GetList(strWhere);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.AdminFlag> GetList(int ParentID, int FlagType, int IsNav, string FlagAction)
        {
            string strWhere = "ParentID = " + ParentID;

            if (FlagType != -1)
            {
                strWhere += " and FlagType=" + FlagType.ToString();
            }

            if (IsNav == 0 || IsNav == 1)
            {
                strWhere += " and IsNav=" + IsNav;
            }

            FlagAction = FlagAction.ToLower();
            if (FlagAction != "")
            {
                strWhere += " and FlagAction='" + Utils.SqlStringFormat(FlagAction, 1) + "'";
            }

            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("AdminFlag", -1, -1, strWhere, "OrderID asc"); // dal.GetList(strWhere);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 获得选择列表
        /// </summary>
        public DataSet GetCheckList(int FlagType)
        {
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetSelect("AdminFlag", "  FlagType = " + FlagType + "", "OrderID asc", " ID,FlagName"); // dal.GetList(strWhere);

            return(ds);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.AdminRole> GetList()
        {
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("AdminRole", -1, -1, "", "OrderID asc"); //dal.GetList(strWhere);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 订单列表查询
        /// </summary>
        public DataTable GetListForMoreTable(int pageSize, int pageIndex, string strWhere, string order)
        {
            var db = new DAL.Common();
            //var ds = db.GetListForMoreTable("UserInfo u,Orders o", pageSize, pageIndex, condition, order, "u.RealName AS workerName ,o.*");
            var ds = db.GetList("Orders", pageSize, pageIndex, strWhere, order, "UserInfo", "RealName AS workerName", "WorkerId = UserInfo.UserName");

            return(ds.Tables[0]);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 获得数据列表(分页获取)
        /// </summary>
        public List <Sys.Model.Member> GetList(int PageSize, int PageIndex, string strWhere)
        {
            string strOrder = "CreateTime desc";

            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("Member", PageSize, PageIndex, strWhere, "UserID asc");

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <returns></returns>
        public List <Sys.Model.Admin> GetList(string strWhere)
        {
            const string strOrder  = " UserName";
            const int    pageSize  = -1;
            const int    pageIndex = -1;
            var          db        = new DAL.Common();
            var          ds        = db.GetList("Admin", pageSize, pageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string  sql = "select * from v_ProjectMaterialB";
            DataSet ds  = new DAL.Common().GetList(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                projectName = ds.Tables[0].Rows[0]["project_name"].ToString();
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="Flag"></param>
        /// <param name="UserID"></param>
        /// <param name="StartTime"></param>
        /// <param name="EndTime"></param>
        /// <returns></returns>
        public List <Sys.Model.AdminLog> GetList(int PageSize, int PageIndex, string Flag, int FlagLike, int UserID, string StartTime, string EndTime)
        {
            string strWhere = "";

            if (Flag != "")
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                if (FlagLike == 1)
                {
                    strWhere += "Flag like '%" + Utils.SqlStringFormat(Flag, 2) + "%'";
                }
                else
                {
                    strWhere += "Flag ='" + Utils.SqlStringFormat(Flag, 1) + "'";
                }
            }

            if (UserID > 0)
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                strWhere += "UserID =" + UserID + "";
            }

            if (StartTime != "" & Utils.IsDateTime(StartTime))
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                strWhere += "CreateTime >='" + Utils.SqlStringFormat(StartTime, 1) + "'";
            }

            if (EndTime != "" & Utils.IsDateTime(EndTime))
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                strWhere += "CreateTime <='" + Utils.SqlStringFormat(EndTime, 1) + "'";
            }

            string strOrder = "ID desc";

            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("AdminLog", PageSize, PageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.Account> GetList(string strCondition)
        {
            var strWhere  = "";
            var strOrder  = "";
            var PageSize  = -1;
            var PageIndex = -1;
            var db        = new DAL.Common();
            var ds        = db.GetList("Account", PageSize, PageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <param name="BlockModule">限制模块 0系统 1用户</param>
        /// <param name="BlockType">限制方式 0白名单 1黑名单</param>
        /// <returns></returns>
        public List <Sys.Model.SysIpBlock> GetList(int BlockModule, int BlockType)
        {
            string strWhere  = "BlockModule=" + BlockModule + " and BlockType=" + BlockType;
            string strOrder  = "ID desc";
            int    PageSize  = -1;
            int    PageIndex = -1;

            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("SysIpBlock", PageSize, PageIndex, strWhere, strOrder);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 15
0
 public DataSet ReadKeyID(string KeyIDTypeAction)
 {
     try
     {
         DAL.Common common = new DAL.Common();
         return(common.ReadRFIDKey(KeyIDTypeAction));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 16
0
 public DataSet EclockSetupSave()
 {
     try
     {
         DAL.Common common = new DAL.Common();
         return(common.ElockSetupSave(this));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 17
0
 public DataSet LoadMavcCard(string ClubID, String mobileNumber, string keyword)
 {
     try
     {
         DAL.Common common = new DAL.Common();
         return(common.WebClockingSave(ClubID, mobileNumber, keyword, "Load"));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 18
0
 public DataSet Pasaload(string mobileNumberFrom, String mobileNumberTo, string Amount)
 {
     try
     {
         DAL.Common common = new DAL.Common();
         return(common.WebClockingSave("", mobileNumberFrom, Amount, "Pasaload", "", mobileNumberTo));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 19
0
 public DataSet UnregMobileNumber(string ClubID, String mobileNumber, string UserID, string keyword)
 {
     try
     {
         DAL.Common common = new DAL.Common();
         return(common.WebClockingSave(ClubID, mobileNumber, keyword, "Unreg", UserID));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 20
0
        private string GetColor(HttpContext context)
        {
            DataSet ds = new DAL.Common().GetList("select  ID as colorID,Code,Name  as colorName   from ProductColor");

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(JsonHelper.DataTable2Json_Combo(ds.Tables[0]));
            }
            else
            {
                return("{\"total\":0,\"rows\":[]}");
            }
        }
Ejemplo n.º 21
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Sys.Model.AdminFlag> GetList(int parentID, int flagType)
        {
            string strWhere = "ParentID = " + parentID;

            if (flagType != -1)
            {
                strWhere += "AND FlagType=" + flagType;
            }
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("AdminFlag", -1, -1, strWhere, "OrderID asc"); // dal.GetList(strWhere);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 数据列表
        /// </summary>
        /// <param name="Item">项目类别</param>
        /// <param name="IsUsing">是否启用 0不启用 1启用 -1全部</param>
        /// <returns></returns>
        public DataSet GetDataSet(string Item, int IsUsing)
        {
            string strWhere = "Item='" + Utils.SqlStringFormat(Item, 1) + "'";

            if (IsUsing == 0 || IsUsing == 1)
            {
                strWhere += " and IsUsing=" + IsUsing;
            }
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("SysConfig", 0, 0, strWhere, "OrderID asc"); //GetList(Item, IsUsing);

            return(ds);
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 数据列表
        /// </summary>
        /// <param name="Item">项目类别</param>
        /// <param name="IsUsing">是否启用 0不启用 1启用 -1全部</param>
        /// <returns></returns>
        public List <Sys.Model.SysConfig> GetList(string Item, int IsUsing)
        {
            string strWhere = "Item='" + Utils.SqlStringFormat(Item, 1) + "'";

            if (IsUsing == 0 || IsUsing == 1)
            {
                strWhere += " and IsUsing=" + IsUsing;
            }
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("SysConfig", 0, 0, strWhere, "OrderID asc"); //GetList(Item, IsUsing);

            return(DataTableToList(ds.Tables[0]));
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 返回一个数据表  List的前身
        /// </summary>
        public DataTable GetListForMoreTable(int pageSize, int pageIndex, string strWhere, string order)
        {
            var db        = new DAL.Common();
            var condition = "u.userid=m.userid";

            if (!string.IsNullOrEmpty(strWhere))
            {
                condition += " and " + strWhere;
            }
            var ds = db.GetListForMoreTable("UserInfo u,member m", pageSize, pageIndex, condition, order, "u.*,m.State");

            return(ds.Tables[0]);
        }
Ejemplo n.º 25
0
        public string GetProjectName(HttpContext context)
        {
            DataSet ds = new DAL.Common().GetList("select sid,project_name from project");

            if (ds.Tables[0].Rows.Count > 0)
            {
                string res = JsonHelper.DataTable2Json_Combo(ds.Tables[0]);
                return(res);
            }
            else
            {
                return("{\"total\":0,\"rows\":[]}");
            }
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 获得总数
        /// </summary>
        /// <param name="Flag"></param>
        /// <param name="FlagLike"></param>
        /// <param name="UserID"></param>
        /// <param name="StartTime"></param>
        /// <param name="EndTime"></param>
        /// <returns></returns>
        public int GetCount(string Flag, int FlagLike, int UserID, string StartTime, string EndTime)
        {
            string strWhere = "";

            if (Flag != "")
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                if (FlagLike == 1)
                {
                    strWhere += "Flag like '%" + Utils.SqlStringFormat(Flag, 2) + "%'";
                }
                else
                {
                    strWhere += "Flag ='" + Utils.SqlStringFormat(Flag, 1) + "'";
                }
            }

            if (UserID > 0)
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                strWhere += "UserID =" + UserID + "";
            }

            if (StartTime != "" & Utils.IsDateTime(StartTime))
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                strWhere += "CreateTime >='" + Utils.SqlStringFormat(StartTime, 1) + "'";
            }

            if (EndTime != "" & Utils.IsDateTime(EndTime))
            {
                if (strWhere != "")
                {
                    strWhere += " and ";
                }
                strWhere += "CreateTime <='" + Utils.SqlStringFormat(EndTime, 1) + "'";
            }
            DAL.Common db = new DAL.Common();
            return(db.GetCount("AdminLog", strWhere));
        }
Ejemplo n.º 27
0
        public JsonResult GetForgotPassword(ForgotPasswordData forgotPasswordData)
        {
            JsonResponse response = new JsonResponse();
            LoginData    lData    = new LoginData();

            DAL.Common common = new DAL.Common();

            var dt = lData.ForgotPassword(forgotPasswordData).Tables[0];

            response.Message = LWT.Common.LWTSafeTypes.SafeString(dt.Rows[0]["ErrMsg"]);

            if (response.Message.Contains("Your password will send to your mobile."))
            {
                string[] value = response.Message.Split('|');
                response.Message = value[0];
                var sms = "Your Password: "******"PR-MARKA754822_4H5EX");
                if (ret.ToString() == "0")
                {
                    common.ChargeText(forgotPasswordData.MobileNumber);
                    response.Message = value[0];
                }
                else
                {
                    response.Message = "Error detected while password is sending on your mobile number.";
                }
            }
            else if (response.Message.Contains("OTP"))
            {
                string[] value = response.Message.Split('|');
                var      sms   = "Your Security Code: " + value[1];
                response.Remarks = "OTP";

                //send security code via sms
                var ret = itexmo(forgotPasswordData.MobileNumber, sms, "PR-MARKA754822_4H5EX");
                if (ret.ToString() == "0")
                {
                    common.ChargeText(forgotPasswordData.MobileNumber);
                    response.Message = "To verify your request, please enter the security code sent on your mobile number.";
                }
                else
                {
                    response.Message = "Error detected while sending security code on your mobile number. Please click [Change Password] button again.";
                }
            }

            return(Json(new { data = response }, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="BlockModule">限制模块 0系统 1用户</param>
        /// <param name="BlockType">限制方式 0白名单 1黑名单</param>
        /// <param name="IPstr">当前IP</param>
        /// <returns></returns>
        public bool Exists(int BlockModule, int BlockType, string IPstr)
        {
            long   IP       = Sys.Common.IP.BlockIP.CalcIP(IPstr);
            string strWhere = "BlockModule=" + BlockModule + " and BlockType=" + BlockType + " and (" + IP + " BETWEEN IpStart and IpEnd)";

            DAL.Common db = new DAL.Common();
            if (db.GetCount("SysIpBlock", strWhere) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 29
0
        public string GetSupplier(HttpContext context)
        {
            //int projectID;
            //int.TryParse(context.Request["projectID"].ToString(), out projectID);
            DataSet ds = new DAL.Common().GetList("select ID spID,Code manufacturerNumber,mobile phone,Abbreviation name from dbo.Supplier");

            if (ds.Tables[0].Rows.Count > 0)
            {
                string res = JsonHelper.DataTable2Json_Combo(ds.Tables[0]);
                return(res);
            }
            else
            {
                return("{\"total\":0,\"rows\":[]}");
            }
        }
Ejemplo n.º 30
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <param name="isAdmin">1表示是Amdin,-1表是不是Admin</param>
        /// <returns></returns>
        public List <Sys.Model.Member> GetList(int isAdmin)
        {
            string strWhere = "";

            if (isAdmin == 1)
            {
                strWhere += " UserID in (SELECT UserID FROM Admin) ";
            }
            else if (isAdmin == -1)
            {
                strWhere += " UserID not in (SELECT UserID FROM Admin) ";
            }
            DAL.Common db = new DAL.Common();
            DataSet    ds = db.GetList("Member", -1, -1, strWhere, "UserID asc");

            return(DataTableToList(ds.Tables[0]));
        }