public string Match_OddsUpdate(MatchModel MModel) { BaseDL bdl = new BaseDL(); DateTime dt = DateTime.ParseExact(MModel.MatchDate.Replace("-", "/"), "dd/MM/yyyy", CultureInfo.GetCultureInfo("en-us")); SqlParameter[] prms = new SqlParameter[3]; prms[0] = new SqlParameter("@UserID", SqlDbType.VarChar) { Value = MModel.UserID }; prms[1] = new SqlParameter("@MatchJson", SqlDbType.VarChar) { Value = MModel.MatchJson }; prms[2] = new SqlParameter("@MatchDate", SqlDbType.Date) { Value = dt }; if (bdl.InsertUpdateDeleteData("M_Match_OddsUpdate", prms)) { return("1"); } return("0"); }
public string GetUserTranstionEntry(UserBalanceModel UBModel) { BaseDL BDL = new BaseDL(); Function FUN = new Function(); SqlParameter[] prms = new SqlParameter[5]; DateTime dt = DateTime.ParseExact(UBModel.PayDate.Replace("-", "/"), "dd/MM/yyyy", CultureInfo.GetCultureInfo("en-us")); prms[0] = new SqlParameter("@PayDate", SqlDbType.Date) { Value = dt }; prms[1] = new SqlParameter("@UserID", SqlDbType.VarChar) { Value = string.IsNullOrWhiteSpace(UBModel.UserID) ? (object)DBNull.Value : UBModel.UserID }; prms[2] = new SqlParameter("@TransitionType", SqlDbType.TinyInt) { Value = string.IsNullOrWhiteSpace(UBModel.TransitionType) ? (object)DBNull.Value : UBModel.TransitionType }; prms[3] = new SqlParameter("@Amount", SqlDbType.Int) { Value = string.IsNullOrWhiteSpace(UBModel.Amount) ? (object)DBNull.Value : UBModel.Amount }; prms[4] = new SqlParameter("@OperatorMode", SqlDbType.VarChar) { Value = string.IsNullOrWhiteSpace(UBModel.OperatorMode) ? (object)DBNull.Value : UBModel.OperatorMode }; if (BDL.InsertUpdateDeleteData("User_Transition_Insert", prms)) { return("true"); } return("false"); }
public async Task <ReturnMessageInfo> setHotelLoginTime(LoginInfo loginInfo) { ReturnMessageInfo msgInfo = new ReturnMessageInfo(); BaseDL bdl = new BaseDL(); NpgsqlParameter[] para = new NpgsqlParameter[3]; para[0] = new NpgsqlParameter("@hotelcode", NpgsqlDbType.Varchar) { Value = loginInfo.HotelCode }; para[1] = new NpgsqlParameter("@usercode", NpgsqlDbType.Varchar) { Value = loginInfo.UserCode }; if (loginInfo.SessionFlag == false) { para[2] = new NpgsqlParameter("@logindate", NpgsqlDbType.Timestamp) { Value = DateTime.Now } } ; else { para[2] = new NpgsqlParameter("@logindate", NpgsqlDbType.Timestamp) { Value = DateTime.Now.AddMinutes(-2) } }; string sql = "update mst_hoteluser set logindate=@logindate where hotel_code=@hotelcode and usercode=@usercode"; msgInfo = await bdl.InsertUpdateDeleteData(sql, para); return(msgInfo); }
public string Category_CUD(CategoryEntryModel categoryModel) { BaseDL bdl = new BaseDL(); categoryModel.Sqlprms = new SqlParameter[13]; categoryModel.Sqlprms[0] = new SqlParameter("@CategoryCD", SqlDbType.VarChar) { Value = categoryModel.CategoryCD }; categoryModel.Sqlprms[1] = new SqlParameter("@CategoryName", SqlDbType.VarChar) { Value = categoryModel.CategoryName }; categoryModel.Sqlprms[2] = new SqlParameter("@ParentCategoryCD", SqlDbType.VarChar) { Value = categoryModel.ParentCategoryCD }; categoryModel.Sqlprms[3] = new SqlParameter("@RakutenDirectoryID", SqlDbType.VarChar) { Value = categoryModel.RakutenDirectoryID }; categoryModel.Sqlprms[4] = new SqlParameter("@YahooCategoryID", SqlDbType.VarChar) { Value = categoryModel.YahooCategoryID }; categoryModel.Sqlprms[5] = new SqlParameter("@PonpareCategoryID", SqlDbType.VarChar) { Value = categoryModel.PonpareCategoryID }; categoryModel.Sqlprms[6] = new SqlParameter("@WowmaCategoryID", SqlDbType.VarChar) { Value = categoryModel.WowmaCategoryID }; categoryModel.Sqlprms[7] = new SqlParameter("@RakutenCategorySetNo", SqlDbType.VarChar) { Value = categoryModel.RakutenCategorySetNo }; categoryModel.Sqlprms[8] = new SqlParameter("@R_RacketCategoryID", SqlDbType.VarChar) { Value = categoryModel.R_RacketCategoryID }; categoryModel.Sqlprms[9] = new SqlParameter("@R_SportsPlazaCategoryID", SqlDbType.VarChar) { Value = categoryModel.R_SportsPlazaCategoryID }; categoryModel.Sqlprms[10] = new SqlParameter("@R_LuckpieceCategoryID", SqlDbType.VarChar) { Value = categoryModel.R_LuckpieceCategoryID }; categoryModel.Sqlprms[11] = new SqlParameter("@R_HonpoCategoryID", SqlDbType.VarChar) { Value = categoryModel.R_HonpoCategoryID }; categoryModel.Sqlprms[12] = new SqlParameter("@Mode", SqlDbType.VarChar) { Value = categoryModel.Mode }; return(bdl.InsertUpdateDeleteData("Category_CUD", categoryModel.Sqlprms)); }
public String Option_Save(OptionModel optionModel) { BaseDL bdl = new BaseDL(); optionModel.Sqlprms = new SqlParameter[13]; optionModel.Sqlprms[0] = new SqlParameter("@AutoID", SqlDbType.VarChar) { Value = optionModel.AutoID }; optionModel.Sqlprms[1] = new SqlParameter("@GroupName", SqlDbType.VarChar) { Value = optionModel.GroupName }; optionModel.Sqlprms[2] = new SqlParameter("@Option1", SqlDbType.VarChar) { Value = optionModel.Option1 }; optionModel.Sqlprms[3] = new SqlParameter("@Value1", SqlDbType.VarChar) { Value = optionModel.Value1 }; optionModel.Sqlprms[4] = new SqlParameter("@Option2", SqlDbType.VarChar) { Value = optionModel.Option2 }; optionModel.Sqlprms[5] = new SqlParameter("@Value2", SqlDbType.VarChar) { Value = optionModel.Value2 }; optionModel.Sqlprms[6] = new SqlParameter("@Option3", SqlDbType.VarChar) { Value = optionModel.Option3 }; optionModel.Sqlprms[7] = new SqlParameter("@Value3", SqlDbType.VarChar) { Value = optionModel.Value3 }; optionModel.Sqlprms[8] = new SqlParameter("@Option4", SqlDbType.VarChar) { Value = optionModel.Option4 }; optionModel.Sqlprms[9] = new SqlParameter("@Value4", SqlDbType.VarChar) { Value = optionModel.Value4 }; optionModel.Sqlprms[10] = new SqlParameter("@Option5", SqlDbType.VarChar) { Value = optionModel.Option5 }; optionModel.Sqlprms[11] = new SqlParameter("@Value5", SqlDbType.VarChar) { Value = optionModel.Value5 }; optionModel.Sqlprms[12] = new SqlParameter("@Mode", SqlDbType.VarChar) { Value = optionModel.Mode }; return(bdl.InsertUpdateDeleteData("Option_CUD", optionModel.Sqlprms)); }
public string CategorySerial_Update(CategoryListModel model) { BaseDL bdl = new BaseDL(); model.Sqlprms = new SqlParameter[1]; model.Sqlprms[0] = new SqlParameter("@CategoryJson", JsonConvert.SerializeObject(model.CategoryList)); return(bdl.InsertUpdateDeleteData("CategorySerial_Update", model.Sqlprms)); }
public string Shop_Save(ShopModel shopModel) { BaseDL bdl = new BaseDL(); shopModel.Sqlprms = new SqlParameter[12]; shopModel.Sqlprms[0] = new SqlParameter("@ShopID", SqlDbType.VarChar) { Value = shopModel.ShopID }; shopModel.Sqlprms[1] = new SqlParameter("@ShopSiteID", SqlDbType.VarChar) { Value = shopModel.ShopSiteID }; shopModel.Sqlprms[2] = new SqlParameter("@ShopName", SqlDbType.VarChar) { Value = shopModel.ShopName }; shopModel.Sqlprms[3] = new SqlParameter("@MAllID", SqlDbType.VarChar) { Value = shopModel.MallID }; shopModel.Sqlprms[4] = new SqlParameter("@FtpHost", SqlDbType.VarChar) { Value = shopModel.FtpHost }; shopModel.Sqlprms[5] = new SqlParameter("@FtpUserName", SqlDbType.VarChar) { Value = shopModel.FtpUserName }; shopModel.Sqlprms[6] = new SqlParameter("@FtpPassword", SqlDbType.VarChar) { Value = shopModel.FtpPassword }; shopModel.Sqlprms[7] = new SqlParameter("@ItemURL", SqlDbType.VarChar) { Value = shopModel.ItemURL }; shopModel.Sqlprms[8] = new SqlParameter("@ImageURL", SqlDbType.VarChar) { Value = shopModel.ImageURL }; shopModel.Sqlprms[9] = new SqlParameter("@FreeShipAmt", SqlDbType.VarChar) { Value = shopModel.FreeShippingAmount }; shopModel.Sqlprms[10] = new SqlParameter("@Status", SqlDbType.VarChar) { Value = shopModel.Status }; shopModel.Sqlprms[11] = new SqlParameter("@Mode", SqlDbType.VarChar) { Value = shopModel.Mode }; return(bdl.InsertUpdateDeleteData("Shop_CUD", shopModel.Sqlprms)); }
public string Import_SKU_Inventory_Update(string filename, string sheetname, string importedBy) { ItemModel itemModel = new ItemModel(); itemModel.fileName = filename; itemModel.sheetName = sheetname; itemModel.UserID = importedBy; BaseDL bdl = new BaseDL(); itemModel.Sqlprms = new SqlParameter[3]; itemModel.Sqlprms[0] = new SqlParameter("@FileName", itemModel.fileName); itemModel.Sqlprms[1] = new SqlParameter("@SheetName", itemModel.sheetName); itemModel.Sqlprms[3] = new SqlParameter("@ImportedBy", itemModel.UserID); return(bdl.InsertUpdateDeleteData("Import_SKUInventory_Update", itemModel.Sqlprms)); }
public string Import_Item_Data(string filename, string sheetname, string importType, string importedBy) { ItemModel itemModel = new ItemModel(); itemModel.fileName = filename; itemModel.sheetName = sheetname; itemModel.importType = importType; itemModel.UserID = importedBy; BaseDL bdl = new BaseDL(); itemModel.Sqlprms = new SqlParameter[4]; itemModel.Sqlprms[0] = new SqlParameter("@FileName", itemModel.fileName); itemModel.Sqlprms[1] = new SqlParameter("@SheetName", itemModel.sheetName); itemModel.Sqlprms[2] = new SqlParameter("@ImportType", itemModel.importType); itemModel.Sqlprms[3] = new SqlParameter("@ImportedBy", itemModel.UserID); return(bdl.InsertUpdateDeleteData("Import_ItemData", itemModel.Sqlprms)); }
public string UserGambling_Calculate(MatchModel MModel) { BaseDL bdl = new BaseDL(); DateTime dt = DateTime.ParseExact(MModel.MatchDate.Replace("-", "/"), "dd/MM/yyyy", CultureInfo.GetCultureInfo("en-us")); SqlParameter[] prms = new SqlParameter[1]; prms[0] = new SqlParameter("@MatchDate", SqlDbType.Date) { Value = dt }; if (bdl.InsertUpdateDeleteData("UserGambling_Calculate", prms)) { return("1"); } return("0"); }
public string ExportField_Save(ExportFieldsModel exportFieldsModel) { BaseDL bdl = new BaseDL(); exportFieldsModel.Sqlprms = new SqlParameter[9]; exportFieldsModel.Sqlprms[0] = new SqlParameter("@ExportName", SqlDbType.VarChar) { Value = exportFieldsModel.ExportName }; exportFieldsModel.Sqlprms[1] = new SqlParameter("@ExportValue", SqlDbType.VarChar) { Value = exportFieldsModel.ExportValue }; exportFieldsModel.Sqlprms[2] = new SqlParameter("@ExportValueID", SqlDbType.VarChar) { Value = exportFieldsModel.ExportValueID }; exportFieldsModel.Sqlprms[3] = new SqlParameter("@Status", SqlDbType.VarChar) { Value = exportFieldsModel.Status }; exportFieldsModel.Sqlprms[4] = new SqlParameter("@CreatedBy", SqlDbType.VarChar) { Value = exportFieldsModel.CreatedBy }; exportFieldsModel.Sqlprms[5] = new SqlParameter("@UpdatedBy", SqlDbType.VarChar) { Value = exportFieldsModel.UpdatedBy }; exportFieldsModel.Sqlprms[6] = new SqlParameter("@ExportType", SqlDbType.VarChar) { Value = exportFieldsModel.ExportType }; exportFieldsModel.Sqlprms[7] = new SqlParameter("@Mode", SqlDbType.VarChar) { Value = exportFieldsModel.Mode }; exportFieldsModel.Sqlprms[8] = new SqlParameter("@AutoID", SqlDbType.VarChar) { Value = exportFieldsModel.AutoID }; return(bdl.InsertUpdateDeleteData("ExportColumn_CUD", exportFieldsModel.Sqlprms)); }
public string ShopItemNamePriority_Update(Shop_ItemNamePriorityModel model) { BaseDL bdl = new BaseDL(); model.Sqlprms = new SqlParameter[3]; model.Sqlprms[0] = new SqlParameter("@ShopID", SqlDbType.VarChar) { Value = model.ShopID }; model.Sqlprms[1] = new SqlParameter("@PriorityValue", SqlDbType.VarChar) { Value = model.PriorityValue }; model.Sqlprms[2] = new SqlParameter("@PriorityValueID", SqlDbType.VarChar) { Value = model.PriorityValueID }; return(bdl.InsertUpdateDeleteData("ShopItemNamePriority_Update", model.Sqlprms)); }
public string BookieConfirm_Insert(BookieModel BModel) { BaseDL bdl = new BaseDL(); SqlParameter[] prms = new SqlParameter[2]; prms[0] = new SqlParameter("@UserID", SqlDbType.VarChar) { Value = BModel.UserID }; prms[1] = new SqlParameter("@BookieConfirmJson", SqlDbType.VarChar) { Value = BModel.BookieConfirmJson }; if (bdl.InsertUpdateDeleteData("BookieGambling_Insert", prms)) { return("1"); } return("0"); }
public string MatchResult_Update(MatchModel MModel) { BaseDL bdl = new BaseDL(); SqlParameter[] prms = new SqlParameter[2]; prms[0] = new SqlParameter("@UserID", SqlDbType.VarChar) { Value = MModel.UserID }; prms[1] = new SqlParameter("@MatchJson", SqlDbType.VarChar) { Value = MModel.MatchJson }; if (bdl.InsertUpdateDeleteData("M_Match_ResultUpdate", prms)) { return("1"); } return("0"); }
public string User_Save(UserModel Umodel) { BaseDL bdl = new BaseDL(); Umodel.ViewJson = JsonConvert.SerializeObject(Umodel.UserView); Umodel.Sqlprms = new SqlParameter[8]; Umodel.Sqlprms[0] = new SqlParameter("@UserID", SqlDbType.VarChar) { Value = Umodel.UserID }; Umodel.Sqlprms[1] = new SqlParameter("@Password", SqlDbType.VarChar) { Value = Umodel.Password }; Umodel.Sqlprms[2] = new SqlParameter("@UserName", SqlDbType.VarChar) { Value = Umodel.UserName }; Umodel.Sqlprms[3] = new SqlParameter("@Status", SqlDbType.VarChar) { Value = Umodel.Status }; Umodel.Sqlprms[4] = new SqlParameter("@Mode", SqlDbType.VarChar) { Value = Umodel.Mode }; Umodel.Sqlprms[5] = new SqlParameter("ViewJson", SqlDbType.VarChar) { Value = Umodel.ViewJson }; Umodel.Sqlprms[6] = new SqlParameter("@CreatedBy", SqlDbType.VarChar) { Value = Umodel.CreatedBy }; Umodel.Sqlprms[7] = new SqlParameter("@UpdatedBy", SqlDbType.VarChar) { Value = Umodel.UpdatedBy }; return(bdl.InsertUpdateDeleteData("User_CUD", Umodel.Sqlprms)); }
public string News_Editor_Delete(string id, string PcName, string InsertOperator) { var message = string.Empty; BaseDL bdl = new BaseDL(); DataTable dtinfo = new DataTable(); SqlParameter[] prms = new SqlParameter[3]; prms[0] = new SqlParameter("@id", SqlDbType.Int) { Value = id }; prms[1] = new SqlParameter("@InsertOperator", SqlDbType.VarChar) { Value = InsertOperator }; prms[2] = new SqlParameter("@AccessPC", SqlDbType.VarChar) { Value = PcName }; bdl.InsertUpdateDeleteData("News_Editor_Delete", prms); message = "OK"; return(message); }
public Boolean InsertGroupEntry(MultipleModel mModel, string PcName) { try { DataTable dt = new DataTable(); BaseDL dl = new BaseDL(); SqlParameter[] prms = new SqlParameter[9]; prms[0] = new SqlParameter("@groupID", SqlDbType.VarChar) { Value = mModel.GroupModel.GroupID }; prms[1] = new SqlParameter("@groupName", SqlDbType.VarChar) { Value = mModel.GroupModel.GroupName }; prms[2] = new SqlParameter("@groupInfoFlag", SqlDbType.VarChar) { Value = mModel.GroupModel.GroupInfoFlg }; if (mModel.ComModel != null) { prms[3] = new SqlParameter("@companyName", SqlDbType.VarChar) { Value = mModel.ComModel.CompanyName }; } else { prms[3] = new SqlParameter("@companyName", SqlDbType.VarChar) { Value = DBNull.Value }; } if (mModel.MBrandModel != null) { prms[4] = new SqlParameter("@BrandName", SqlDbType.VarChar) { Value = mModel.MBrandModel.BrandName }; } else { prms[4] = new SqlParameter("@BrandName", SqlDbType.VarChar) { Value = DBNull.Value }; } if (mModel.tModel != null) { prms[5] = new SqlParameter("@tag", SqlDbType.VarChar) { Value = mModel.tModel.Tag }; } else { prms[5] = new SqlParameter("@tag", SqlDbType.VarChar) { Value = DBNull.Value }; } prms[6] = new SqlParameter("@AccessPC", SqlDbType.VarChar) { Value = PcName }; prms[7] = new SqlParameter("@insertOperator", SqlDbType.VarChar) { Value = mModel.GroupModel.InsertOperator }; prms[8] = new SqlParameter("@saveUpdateFlag", SqlDbType.VarChar) { Value = mModel.GroupModel.SaveUpdateFlag }; dl.InsertUpdateDeleteData("Group_Entry_Insert", prms); return(true); } catch (Exception ex) { string aa = ex.Message; return(false); } }
public Boolean News_Editor_Save(MultipleModel model, string PcName) { try { BaseDL bdl = new BaseDL(); DataTable dtinfo = new DataTable(); SqlParameter[] prms = new SqlParameter[17]; prms[0] = new SqlParameter("@destinationflag", SqlDbType.Int) { Value = model.TinfoModel.DestinationFlag }; if (model.ComModel != null) { prms[1] = new SqlParameter("@companyCD", SqlDbType.VarChar) { Value = model.ComModel.CompanyCD } } ; else { prms[1] = new SqlParameter("@companyCD", SqlDbType.VarChar) { Value = DBNull.Value } }; if (model.GroupModel != null) { prms[2] = new SqlParameter("@groupID", SqlDbType.VarChar) { Value = model.GroupModel.GroupID } } ; else { prms[2] = new SqlParameter("@groupID", SqlDbType.VarChar) { Value = DBNull.Value } }; if (model.TinfoModel.DisplayStartDate != DateTime.MinValue) { prms[3] = new SqlParameter("@startdate", SqlDbType.VarChar) { Value = model.TinfoModel.DisplayStartDate } } ; else { prms[3] = new SqlParameter("@startdate", SqlDbType.VarChar) { Value = DateTime.MinValue } }; if (model.TinfoModel.DisplayEndDate != DateTime.MinValue) { prms[4] = new SqlParameter("@enddate", SqlDbType.VarChar) { Value = model.TinfoModel.DisplayEndDate } } ; else { prms[4] = new SqlParameter("@enddate", SqlDbType.VarChar) { Value = DateTime.MinValue } }; prms[5] = new SqlParameter("@infotype", SqlDbType.VarChar) { Value = model.TinfoModel.InformationType }; if (model.TinfoModel.EffectFlag == true) { prms[6] = new SqlParameter("@effectflag", SqlDbType.Int) { Value = 0 } } ; else { prms[6] = new SqlParameter("@effectflag", SqlDbType.Int) { Value = 1 } }; if (model.TinfoModel.Date != DateTime.MinValue) { prms[7] = new SqlParameter("@date", SqlDbType.VarChar) { Value = model.TinfoModel.Date } } ; else { prms[7] = new SqlParameter("@date", SqlDbType.VarChar) { Value = DateTime.MinValue } }; prms[8] = new SqlParameter("@titlename", SqlDbType.VarChar) { Value = model.TinfoModel.TitleName }; if (model.TinfoModel.AttachedFile1 != null) { prms[9] = new SqlParameter("@file1", SqlDbType.VarChar) { Value = model.TinfoModel.AttachedFile1 } } ; else { prms[9] = new SqlParameter("@file1", SqlDbType.VarChar) { Value = DBNull.Value } }; if (model.TinfoModel.AttachedFile2 != null) { prms[10] = new SqlParameter("@file2", SqlDbType.VarChar) { Value = model.TinfoModel.AttachedFile2 } } ; else { prms[10] = new SqlParameter("@file2", SqlDbType.VarChar) { Value = DBNull.Value } }; if (model.TinfoModel.AttachedFile3 != null) { prms[11] = new SqlParameter("@file3", SqlDbType.VarChar) { Value = model.TinfoModel.AttachedFile3 } } ; else { prms[11] = new SqlParameter("@file3", SqlDbType.VarChar) { Value = DBNull.Value } }; if (model.TinfoModel.AttachedFile4 != null) { prms[12] = new SqlParameter("@file4", SqlDbType.VarChar) { Value = model.TinfoModel.AttachedFile4 } } ; else { prms[12] = new SqlParameter("@file4", SqlDbType.VarChar) { Value = DBNull.Value } }; if (model.TinfoModel.DetailInformation != null) { prms[13] = new SqlParameter("@detail", SqlDbType.VarChar) { Value = model.TinfoModel.DetailInformation } } ; else { prms[13] = new SqlParameter("@detail", SqlDbType.VarChar) { Value = DBNull.Value } }; prms[14] = new SqlParameter("@insertoperator", SqlDbType.VarChar) { Value = model.TinfoModel.InsertOperator }; prms[15] = new SqlParameter("@AccessPC", SqlDbType.VarChar) { Value = PcName }; if (model.TinfoModel.InformationID != 0) { prms[16] = new SqlParameter("@InformationID", SqlDbType.Int) { Value = model.TinfoModel.InformationID } } ; else { prms[16] = new SqlParameter("@InformationID", SqlDbType.Int) { Value = 0 } }; bdl.InsertUpdateDeleteData("News_Editor_Insert", prms); return(true); } catch (Exception ex) { return(false); } }
public string ShopTemplate_Save(ShopTemplateModel shopTemplateModel) { BaseDL bdl = new BaseDL(); shopTemplateModel.Sqlprms = new SqlParameter[19]; shopTemplateModel.Sqlprms[0] = new SqlParameter("@Mode", SqlDbType.VarChar) { Value = shopTemplateModel.Mode }; shopTemplateModel.Sqlprms[1] = new SqlParameter("@TemplateID", SqlDbType.VarChar) { Value = shopTemplateModel.TemplateID }; shopTemplateModel.Sqlprms[2] = new SqlParameter("@TemplateName", SqlDbType.VarChar) { Value = shopTemplateModel.TemplateName }; shopTemplateModel.Sqlprms[3] = new SqlParameter("@R_racket", SqlDbType.VarChar) { Value = shopTemplateModel.R_racket }; shopTemplateModel.Sqlprms[4] = new SqlParameter("@R_sportsplaza", SqlDbType.VarChar) { Value = shopTemplateModel.R_sportsplaza }; shopTemplateModel.Sqlprms[5] = new SqlParameter("@R_luckpiece", SqlDbType.VarChar) { Value = shopTemplateModel.R_luckpiece }; shopTemplateModel.Sqlprms[6] = new SqlParameter("@R_honpo", SqlDbType.VarChar) { Value = shopTemplateModel.R_honpo }; shopTemplateModel.Sqlprms[7] = new SqlParameter("@Y_racket", SqlDbType.VarChar) { Value = shopTemplateModel.Y_racket }; shopTemplateModel.Sqlprms[8] = new SqlParameter("@Y_sportsplaza", SqlDbType.VarChar) { Value = shopTemplateModel.Y_sportsplaza }; shopTemplateModel.Sqlprms[9] = new SqlParameter("@Y_luckpiece", SqlDbType.VarChar) { Value = shopTemplateModel.Y_luckpiece }; shopTemplateModel.Sqlprms[10] = new SqlParameter("@Y_honpo", SqlDbType.VarChar) { Value = shopTemplateModel.Y_honpo }; shopTemplateModel.Sqlprms[11] = new SqlParameter("@Y_bb_plaza", SqlDbType.VarChar) { Value = shopTemplateModel.Y_bb_plaza }; shopTemplateModel.Sqlprms[12] = new SqlParameter("@P_racket", SqlDbType.VarChar) { Value = shopTemplateModel.P_racket }; shopTemplateModel.Sqlprms[13] = new SqlParameter("@A_rasta", SqlDbType.VarChar) { Value = shopTemplateModel.A_rasta }; shopTemplateModel.Sqlprms[14] = new SqlParameter("@J_racket", SqlDbType.VarChar) { Value = shopTemplateModel.J_racket }; shopTemplateModel.Sqlprms[15] = new SqlParameter("@W_wowma", SqlDbType.VarChar) { Value = shopTemplateModel.W_wowma }; shopTemplateModel.Sqlprms[16] = new SqlParameter("@Status", SqlDbType.VarChar) { Value = shopTemplateModel.Status }; shopTemplateModel.Sqlprms[17] = new SqlParameter("@CreatedBy", SqlDbType.VarChar) { Value = shopTemplateModel.CreatedBy }; shopTemplateModel.Sqlprms[18] = new SqlParameter("@UpdatedBy", SqlDbType.VarChar) { Value = shopTemplateModel.UpdatedBy }; return(bdl.InsertUpdateDeleteData("ShopTemplate_CUD", shopTemplateModel.Sqlprms)); }
public Boolean Order_Input_Insert(T_OrderHeaderModel toh, DataTable dtorder) { try { BaseDL dl = new BaseDL(); SqlParameter[] prms = new SqlParameter[13]; prms[0] = new SqlParameter("@OrderID", SqlDbType.VarChar) { Value = toh.OrderID }; prms[1] = new SqlParameter("@ShippingID", SqlDbType.VarChar) { Value = toh.ShippingID }; if (toh.ShippingName == null) { prms[2] = new SqlParameter("@ShippingName", SqlDbType.VarChar) { Value = DBNull.Value }; } else { prms[2] = new SqlParameter("@ShippingName", SqlDbType.VarChar) { Value = toh.ShippingName }; } if (toh.ZipCD1 == null) { prms[3] = new SqlParameter("@ZipCD1", SqlDbType.VarChar) { Value = DBNull.Value }; } else { prms[3] = new SqlParameter("@ZipCD1", SqlDbType.VarChar) { Value = toh.ZipCD1 }; } if (toh.ZipCD2 == null) { prms[4] = new SqlParameter("@ZipCD2", SqlDbType.VarChar) { Value = DBNull.Value }; } else { prms[4] = new SqlParameter("@ZipCD2", SqlDbType.VarChar) { Value = toh.ZipCD2 }; } if (toh.Address1 == null) { prms[5] = new SqlParameter("@Address1", SqlDbType.VarChar) { Value = DBNull.Value }; } else { prms[5] = new SqlParameter("@Address1", SqlDbType.VarChar) { Value = toh.Address1 }; } if (toh.Address2 == null) { prms[6] = new SqlParameter("@Address2", SqlDbType.VarChar) { Value = DBNull.Value }; } else { prms[6] = new SqlParameter("@Address2", SqlDbType.VarChar) { Value = toh.Address2 }; } if (toh.TelephoneNO == null) { prms[7] = new SqlParameter("@PhoneNo", SqlDbType.VarChar) { Value = DBNull.Value }; } else { prms[7] = new SqlParameter("@PhoneNo", SqlDbType.VarChar) { Value = toh.TelephoneNO }; } prms[8] = new SqlParameter("@TotalAmount", SqlDbType.VarChar) { Value = toh.TotalAmount }; if (toh.Memo == null) { prms[9] = new SqlParameter("@Memo", SqlDbType.VarChar) { Value = DBNull.Value }; } else { prms[9] = new SqlParameter("@Memo", SqlDbType.VarChar) { Value = toh.Memo }; } prms[10] = new SqlParameter("@UpdateOperator", SqlDbType.VarChar) { Value = toh.UpdateOperator }; prms[11] = new SqlParameter("@AccessPC", SqlDbType.VarChar) { Value = toh.AccessPC }; dtorder.TableName = "order"; System.IO.StringWriter writer = new System.IO.StringWriter(); dtorder.WriteXml(writer, XmlWriteMode.WriteSchema, false); string result = writer.ToString(); prms[12] = new SqlParameter("@xml", SqlDbType.Xml) { Value = result }; var option = new TransactionOptions { IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted, Timeout = TimeSpan.MaxValue }; using (TransactionScope scopt = new TransactionScope(TransactionScopeOption.Required, option)) { dl.InsertUpdateDeleteData("Order_Input_Insert", prms); scopt.Complete(); return(true); } } catch (Exception ex) { return(false); } }