11
This commit is contained in:
@@ -35,6 +35,7 @@ namespace BLL
|
||||
newUnitStore.UnitStoreCode = unitStore.UnitStoreCode;
|
||||
newUnitStore.UnitStoreName = unitStore.UnitStoreName;
|
||||
newUnitStore.StorePosition = unitStore.StorePosition;
|
||||
newUnitStore.IsUse=unitStore.IsUse;
|
||||
db.Weld_UnitStore.InsertOnSubmit(newUnitStore);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -53,6 +54,7 @@ namespace BLL
|
||||
newUnitStore.UnitStoreCode = unitStore.UnitStoreCode;
|
||||
newUnitStore.UnitStoreName = unitStore.UnitStoreName;
|
||||
newUnitStore.StorePosition = unitStore.StorePosition;
|
||||
newUnitStore.IsUse = unitStore.IsUse;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -93,6 +95,29 @@ namespace BLL
|
||||
}
|
||||
|
||||
public static void InitUnitStoreDropDownList(FineUIPro.DropDownList dropName, string unitId, bool isShowPlease)
|
||||
{
|
||||
var store = from x in Funs.DB.Weld_UnitStore
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.IsUse==true
|
||||
orderby y.UnitName, x.UnitStoreCode
|
||||
select new { x.UnitStoreId, UnitStoreName = (y.UnitName + "(" + x.UnitStoreName + ")"), y.UnitName, x.UnitId };
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
store = store.Where(x => x.UnitId == unitId);
|
||||
}
|
||||
|
||||
dropName.DataValueField = "UnitStoreId";
|
||||
dropName.DataTextField = "UnitStoreName";
|
||||
dropName.DataGroupField = "UnitName";
|
||||
dropName.DataSource = store.ToList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitUnitStoreAll(FineUIPro.DropDownList dropName, string unitId, bool isShowPlease)
|
||||
{
|
||||
var store = from x in Funs.DB.Weld_UnitStore
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
|
||||
Reference in New Issue
Block a user