public List <State> GetStateListForDropDown() { List <State> listSate = new List <State>(); DAL_Common dAL_Common = new DAL_Common(); listSate = dAL_Common.GetStateList(); State state = new State(); state.Name = "--Select State--"; state.ID = 0; listSate.Add(state); return(listSate); }
public List <City> GetCityByStateIDForDropDown(string selectedState) { List <City> listCity = new List <City>(); DAL_Common dAL_Common = new DAL_Common(); listCity = dAL_Common.GetCityByStateID(selectedState); City state = new City(); state.Name = "--Select City--"; state.ID = 0; listCity.Add(state); return(listCity); }
/// <summary> /// Saves the products data to DB /// </summary> /// <param name="dt"></param> public List <ProductsMaster> SaveProductsData(DataTable dt, Requester requester) { DAL_Products dAL_Products = new DAL_Products(); DAL_Common dAL_Common = new DAL_Common(); List <ProductsMaster> listProduct = new List <ProductsMaster>(); UserMaster userMaster = new UserMaster(); userMaster = dAL_Common.GetUserdetailsByUsername(requester.Name); if (dt != null & dt.Rows.Count > 0) { foreach (DataRow row in dt.Rows) { ProductsMaster product = new ProductsMaster(); product.Name = Convert.ToString(row["Name"]); product.HSNCode = Convert.ToString(row["HSNCode"] is DBNull ? DBNull.Value : row["HSNCode"]); product.SACCode = Convert.ToString(row["SACCode"] is DBNull ? DBNull.Value : row["SACCode"]); product.Description = Convert.ToString(row["Description"]); product.CessPercentage = Convert.ToString(row["CessPercentage"]); product.GSTPercentage = Convert.ToString(row["GSTPercentage"]).Equals("NIL", StringComparison.InvariantCultureIgnoreCase) ? null : Convert.ToString(row["GSTPercentage"]); product.IsActive = true; product.CreatedOn = DateTime.Now; product.UpdatedOn = DateTime.Now; if (userMaster != null) { product.CreatedBy = userMaster.ID; product.UpdatedBy = userMaster.ID; } else { product.CreatedBy = 1; product.UpdatedBy = 1; } listProduct.Add(product); } return(dAL_Products.SaveProductsData(listProduct)); } return(listProduct); }
public UserOpMap GetUserOperationMapping(string name, string userRole) { UserOpMap userOpMap = new UserOpMap(); UserMaster userMaster = new UserMaster(); DAL_Common dAL_Common = new DAL_Common(); userMaster = dAL_Common.GetUserdetailsByUsernameAndRole(name, userRole); if (userMaster != null) { List <Operations> operations = new List <Operations>(); operations = dAL_Common.GetOperationListForUser(userMaster.ID); if (operations != null) { userOpMap.Username = userMaster.UserName; userOpMap.UserID = Convert.ToString(userMaster.ID); userOpMap.UserRoleName = userRole; foreach (Operations op in operations) { userOpMap.OperationsList = operations; } } } return(userOpMap); }
public State GetStateByGSTIN(string gstin) { DAL_Common dAL_Common = new DAL_Common(); return(dAL_Common.GetStateByGSTIN(gstin)); }
public State GetStateByID(string number) { DAL_Common dAL_Common = new DAL_Common(); return(dAL_Common.GetStateByID(number)); }
public string GetUserRole(long userID) { DAL_Common dAL_Common = new DAL_Common(); return(dAL_Common.GetUserRole(userID)); }
public UserMaster GetUserdetailsByUsernamePass(string username, string passWord) { DAL_Common dAL_Common = new DAL_Common(); return(dAL_Common.GetUserdetailsByUsernamePass(username, passWord)); }
public string GetCityNameByID(long?cityID) { DAL_Common dAL_Common = new DAL_Common(); return(dAL_Common.GetCityNameByID(cityID)); }
public string GetStateNameByID(long?stateID) { DAL_Common dAL_Common = new DAL_Common(); return(dAL_Common.GetStateNameByID(stateID)); }
public bool ValidateUserLogin(string username, string pass) { DAL_Common dAL_Common = new DAL_Common(); return(dAL_Common.ValidateUserLogin(username, pass)); }