public int InsertCardProvider(string CardName, bool isPublish) { if (IsAdmin) { var ocard = new CardMasterProvider() { CardProviderId = -1, CreatedBy = 1, CreatedOnDate = System.DateTime.Now, DisplayName = CardName, IsDeleted = false, IsPublic = isPublish, ModifiedBy = 1, ModifiedOnDate = System.DateTime.Now }; return(InsertCardProvider(ocard)); } return(0); }
protected void btnSave_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtCardName.Text)) { var oCardProvider = new CardMasterProvider() { CardProviderId = -1, CreatedBy = 1, CreatedOnDate = System.DateTime.Now, DisplayName = txtCardName.Text, IsDeleted = false, IsPublic = chkIsPublish.Checked, ModifiedBy = 1, ModifiedOnDate = System.DateTime.Now }; var oController = new DBController(); oController.InsertCardProvider(oCardProvider); GetCardProvider(); ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "SuccessNotification('Success','Record has been added successfully')", true); } }
public int InsertCardProvider(CardMasterProvider ocardMasterProvider) { return(dbContext.InsertCardProvider(ocardMasterProvider)); }