11
This commit is contained in:
@@ -50,6 +50,7 @@ namespace BLL
|
||||
newConst.ConstId = consts.ConstId;
|
||||
newConst.ConstValue = consts.ConstValue;
|
||||
newConst.ConstText = consts.ConstText;
|
||||
newConst.GroupType = consts.GroupType;
|
||||
newConst.GroupId = consts.GroupId;
|
||||
Funs.DB.Base_Const.InsertOnSubmit(newConst);
|
||||
Funs.DB.SubmitChanges();
|
||||
@@ -66,6 +67,7 @@ namespace BLL
|
||||
{
|
||||
newConst.ConstValue = consts.ConstValue;
|
||||
newConst.ConstText = consts.ConstText;
|
||||
newConst.GroupType = consts.GroupType;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -161,5 +163,33 @@ namespace BLL
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 只对项目状态的查询
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="groupId"></param>
|
||||
/// <param name="projectStatus"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitConstValueProjectStatus(FineUIPro.DropDownList dropName, string groupId, string projectStatus, bool isShowPlease)
|
||||
{
|
||||
|
||||
dropName.DataValueField = "ConstValue";
|
||||
dropName.DataTextField = "ConstText";
|
||||
if (projectStatus == "2") // 非Other类型
|
||||
{
|
||||
dropName.DataSource = (from x in Funs.DB.Base_Const where x.GroupId == groupId && (x.GroupType=="1" ||x.GroupType == "2") orderby x.ConstValue select x).ToList();
|
||||
}
|
||||
else if (projectStatus == "3") //Other类型
|
||||
{
|
||||
dropName.DataSource = (from x in Funs.DB.Base_Const where x.GroupId == groupId && (x.GroupType == "1" || x.GroupType == "3") orderby x.ConstValue select x).ToList();
|
||||
}
|
||||
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user