Example #1
0
        public User LoginUser(string UserName, string UserPassword)
        {
            DataSet           dsList  = new DataSet();
            CoreSQLConnection CoreSQL = new CoreSQLConnection();
            User model = new User();

            try
            {
                if (UserName != null && UserPassword != null)
                {
                    if (UserName.Trim() != "" && UserPassword.Trim() != "")
                    {
                        String strQuery = "http://203.80.189.18:5190/acl.sales/LoginUser/GetUserList";
                        dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
                        dsList.Tables[0].TableName = "Login";
                        foreach (DataRow row in dsList.Tables[0].Rows)
                        {
                            if (row[2].ToString() == UserPassword)
                            {
                                model.prcSetData(row);
                                return(model);
                            }
                        }
                    }
                }
                return(null);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
            }
        }
Example #2
0
        public string GetFuelList(string searchdata)
        {
            var userid = _httpContextAccessor.HttpContext.User.GetLoggedInUserId <string>();
            CoreSQLConnection CoreSQL  = new CoreSQLConnection();
            string            strQuery = "Exec [prcDynamic_FuelList]  @userId = '" + userid + "', @SearchData ='" + searchdata + "' ";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
        public string GetConveyType()
        {
            CoreSQLConnection CoreSQL  = new CoreSQLConnection();
            DataSet           dsList   = new DataSet();
            string            strQuery = "Exec [prcGet_ConveyanceType]";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
        public string GetConveyInfo(int visitid)
        {
            CoreSQLConnection CoreSQL  = new CoreSQLConnection();
            DataSet           dsList   = new DataSet();
            string            strQuery = "Exec [prcGet_ConveyData] " + visitid;

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
Example #5
0
        public string GetJsonUserList()
        {
            CoreSQLConnection CoreSQL  = new CoreSQLConnection();
            DataSet           dsList   = new DataSet();
            string            strQuery = "exec [prcGet_UserList] ";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
Example #6
0
        public string GetVisitDetailsByLocCustId(int id)
        {
            CoreSQLConnection CoreSQL  = new CoreSQLConnection();
            DataSet           dsList   = new DataSet();
            string            strQuery = "Exec [prcGet_VisitDetails] '" + id + "' ";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
        public string GetUser()
        {
            DataSet           dsList   = new DataSet();
            CoreSQLConnection CoreSQL  = new CoreSQLConnection();
            string            strQuery = "Exec prcGetValidateLogin";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
Example #8
0
        public string GetProductList()
        {
            CoreSQLConnection CoreSQL = new CoreSQLConnection();

            dsList = new DataSet();
            string strQuery = "Exec [prcGet_ProductList] 2";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
Example #9
0
        public string GetCustomerById(int id)
        {
            CoreSQLConnection CoreSQL = new CoreSQLConnection();

            dsList = new DataSet();
            string strQuery = "Exec prcGet_Customer '" + id + "' ";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
Example #10
0
        public string GetCustomer(string searchdata)
        {
            CoreSQLConnection CoreSQL = new CoreSQLConnection();

            dsList = new DataSet();
            string strQuery = "Exec [prcGet_CustomerBySearch] " + searchdata;

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
Example #11
0
        public string GetUnit()
        {
            CoreSQLConnection CoreSQL = new CoreSQLConnection();

            dsList = new DataSet();
            string strQuery = "Exec [prcGetUnit] '" + ComId + "', 0 ";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
Example #12
0
        public string GetProduct(int Productid)
        {
            CoreSQLConnection CoreSQL = new CoreSQLConnection();

            dsList = new DataSet();
            string strQuery = "Exec [prcGet_Product] 0,'" + Productid + "' ";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerializeDataSet(dsList));
        }
Example #13
0
        public string GetVisitCustomerList(string pageindex, string pagesize, string searchdata)
        {
            var userid = _httpContextAccessor.HttpContext.User.GetLoggedInUserId <string>();
            CoreSQLConnection CoreSQL  = new CoreSQLConnection();
            DataSet           dsList   = new DataSet();
            string            strQuery = "Exec [prcDynamic_search_Assignment1]  @PageIndex = '" + pageindex + "', @PageSize = '" + pagesize + "', @Name = '" + searchdata + "'  , @OrderBy ='Name' ";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
Example #14
0
        public string GetCombo()
        {
            CoreSQLConnection CoreSQL = new CoreSQLConnection();

            dsList = new DataSet();
            string strQuery = "Exec [prcGet_Supplier] 0,0";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[1]));
        }
Example #15
0
        public string GetSupplierById(int supplierid)
        {
            CoreSQLConnection CoreSQL = new CoreSQLConnection();

            dsList = new DataSet();
            string strQuery = "Exec [prcGet_Supplier] 0,'" + supplierid + "' ";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
Example #16
0
        public string GetAllVisitCustomerList(string searchdata, string custtype, string dtfrom, string dtto)
        {
            var userid = _httpContextAccessor.HttpContext.User.GetLoggedInUserId <string>();
            CoreSQLConnection CoreSQL = new CoreSQLConnection();
            DataSet           dsList  = new DataSet();

            if (string.IsNullOrEmpty(userid))
            {
                throw new InvalidOperationException("User Not found");
            }
            string strQuery = "Exec [prcGet_VisitCustomerList]  @UserId = '" + userid + "',  @Name = '" + searchdata + "', @Type = '" + custtype + "',  @dtFrom = '" + dtfrom + "', @dtTo='" + dtto + "'";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
Example #17
0
        public string GetTotalVisitDay()
        {
            var userid = _httpContextAccessor.HttpContext.User.GetLoggedInUserId <string>();

            if (string.IsNullOrEmpty(userid))
            {
                throw new InvalidOperationException("User Not found");
            }
            CoreSQLConnection CoreSQL = new CoreSQLConnection();

            dsList = new DataSet();
            string strQuery = "Exec [prcGet_DayVisit] '" + userid + "' ";

            dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
            return(clsCommon.JsonSerialize(dsList.Tables[0]));
        }
        public User LoginUser(string UserName, string UserPassword)
        {
            DataSet           dsList  = new DataSet();
            CoreSQLConnection CoreSQL = new CoreSQLConnection();
            User model = new User();

            try
            {
                if (UserName != null && UserPassword != null)
                {
                    if (UserName.Trim() != "" && UserPassword.Trim() != "")
                    {
                        String strQuery = "Exec prcGetValidateLogin '" + UserName.ToLower() + "'";
                        dsList = CoreSQL.CoreSQL_GetDataSet(strQuery);
                        dsList.Tables[0].TableName = "Login";
                        foreach (DataRow row in dsList.Tables[0].Rows)
                        {
                            if (CoreSQL.GetDecryptedData(row[2].ToString()) == UserPassword)
                            {
                                model.prcSetData(row);
                                model.UserPassword = CoreSQL.GetDecryptedData(model.UserPassword);
                                return(model);
                            }
                        }
                    }
                }
                return(null);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
            }
        }