public static void SaveSetting() { using (FBEntityBLL bll = new FBEntityBLL()) { bll.BassBllSave(etityT_FB_SYSTEMSETTINGS, FBEntityState.Modified); } }
public static string GetOrderCode(T_FB_ORDERCODE orderCode) { lock (lockObject) { DateTime CurrentDate = orderCode.CURRENTDATE.Value; if (CurrentDate.Date != System.DateTime.Now.Date) { orderCode.CURRENTDATE = System.DateTime.Now.Date; orderCode.RUNNINGNUMBER = 1; } string shortName = orderCode.PRENAME; decimal curNumber = orderCode.RUNNINGNUMBER.Value; string strDate = orderCode.CURRENTDATE.Value.ToString("yyyyMMdd"); string code = shortName + "_" + strDate + curNumber.ToString().PadLeft(6, '0'); orderCode.RUNNINGNUMBER = Convert.ToInt32(curNumber + 1); using (FBEntityBLL bll = new FBEntityBLL()) { bll.BassBllSave(orderCode, FBEntityState.Modified); } return(code); } }
public static string GetOrderCode(T_FB_ORDERCODE orderCode) { lock (lockObject) { DateTime CurrentDate = orderCode.CURRENTDATE.Value; if (CurrentDate.Date != System.DateTime.Now.Date) { orderCode.CURRENTDATE = System.DateTime.Now.Date; orderCode.RUNNINGNUMBER = 1; } string shortName = orderCode.PRENAME; decimal curNumber = orderCode.RUNNINGNUMBER.Value; string strDate = orderCode.CURRENTDATE.Value.ToString("yyyyMMdd"); string code = shortName + "_" + strDate + curNumber.ToString().PadLeft(6, '0'); orderCode.RUNNINGNUMBER = Convert.ToInt32(curNumber + 1); using (FBEntityBLL bll = new FBEntityBLL()) { bll.BassBllSave(orderCode, FBEntityState.Modified); } return code; } }