public ActionResult GetModel2(UserInfo model) { List <T_WareHouseInfo> wmodelList = new List <T_WareHouseInfo>(); string strMsg = ""; DividPage page = new DividPage { PagesCount = 1000 }; T_WareHouseInfo Wmodel = new T_WareHouseInfo(); tfunc_warehouse.GetModelListByPage(ref wmodelList, currentUser, Wmodel, ref page, ref strMsg); List <T_UserGroupInfo> gmodelList = new List <T_UserGroupInfo>(); T_UserGroupInfo Gmodel = new T_UserGroupInfo(); gfunc_warehouse.GetModelListByPage(ref gmodelList, currentUser, Gmodel, ref page, ref strMsg); ViewData["Warehouse"] = wmodelList; ViewData["serGroup"] = gmodelList; tfunc.GetModelByID(ref model, ref strMsg); return(View("getmodel", model)); }
protected override bool CheckModelBeforeSave(UserInfo model, ref string strError) { if (model == null) { strError = "客户端传来的实体类不能为空!"; return(false); } if (model.UserStatus <= 0) { strError = "用户状态必须选择!"; return(false); } if (model.UserType <= 0) { strError = "用户类型必须选择!"; return(false); } if (BILBasic.Common.Common_Func.IsNullOrEmpty(model.UserNo)) { strError = "登录名不能为空!"; return(false); } if (Common_Func.IsNullOrEmpty(model.UserName)) { strError = "用户姓名不能为空!"; return(false); } if (Common_Func.IsNullOrEmpty(model.PassWord) || Common_Func.IsNullOrEmpty(model.RePassword)) { strError = "登陆密码和确认密码不能为空!"; return(false); } //判断据点和仓库的关系 T_WareHouse_Func Wfunc = new T_WareHouse_Func(); string Msg = ""; string[] warehousenos = model.WarehouseCode.Split(','); for (int i = 0; i < warehousenos.Length; i++) { T_WareHouseInfo warehouse = new T_WareHouseInfo() { ID = Convert.ToInt16(warehousenos[i]) }; Wfunc.GetModelByID(ref warehouse, ref Msg); if (model.StrongHoldCode == "0300") { if (warehouse.WareHouseNo.Substring(0, 1) != "G") { strError = "仓库和据点没有对应关系!"; return(false); } } if (model.StrongHoldCode == "0401") { if (warehouse.WareHouseNo.Substring(0, 2) != "C1") { strError = "仓库和据点没有对应关系!"; return(false); } } if (model.StrongHoldCode == "0402") { if (warehouse.WareHouseNo.Substring(0, 2) != "C2") { strError = "仓库和据点没有对应关系!"; return(false); } } if (model.StrongHoldCode == "0403") { if (warehouse.WareHouseNo.Substring(0, 2) != "C3") { strError = "仓库和据点没有对应关系!"; return(false); } } } //if (Common_Func.IsNullOrEmpty(model.GroupCode)) //{ // strError = "用户分组不能为空!"; // return false; //} if (!Common_Func.IsEqualString(model.PassWord, model.RePassword)) { strError = "确认密码与登陆密码不一致!"; return(false); } return(true); }
public bool UpdateT_WareHouseStatus(UserInfo user, ref T_WareHouseInfo t_warehouse, int NewStatus, ref string strError) { T_WareHouse_Func tfunc = new T_WareHouse_Func(); return(tfunc.UpdateModelStatus(user, ref t_warehouse, NewStatus, ref strError)); }
public bool GetT_WareHouseListByPage(ref List <T_WareHouseInfo> modelList, UserInfo user, T_WareHouseInfo t_warehouse, ref DividPage page, ref string strError) { T_WareHouse_Func tfunc = new T_WareHouse_Func(); return(tfunc.GetModelListByPage(ref modelList, user, t_warehouse, ref page, ref strError)); }
public bool GetT_WareHouseByID(ref T_WareHouseInfo model, ref string strError) { T_WareHouse_Func tfunc = new T_WareHouse_Func(); return(tfunc.GetModelByID(ref model, ref strError)); }
public bool DeleteT_WareHouseByModel(UserInfo user, T_WareHouseInfo model, ref string strError) { T_WareHouse_Func tfunc = new T_WareHouse_Func(); return(tfunc.DeleteModelByModel(user, model, ref strError)); }
public bool SaveT_WareHouse(UserInfo user, ref T_WareHouseInfo t_warehouse, ref string strError) { T_WareHouse_Func tfunc = new T_WareHouse_Func(); return(tfunc.SaveModelToDB(user, ref t_warehouse, ref strError)); }