public bool SaveState(MST_STATE mST_STATE) { try { unitOfWork.StateRepository.Create(mST_STATE); unitOfWork.Save(); return(true); } catch (Exception ex) { return(false); } }
protected void btnSave_Click(object sender, EventArgs e) { MST_STATE state = new MST_STATE(); try { state.StateName = txtStateName.Text.Trim(); //state.CreatedBy = ; state.CreatedDate = DateTime.Now; state.CountryId = 1; stateModel.SaveState(state); txtStateName.Text = ""; GetAllState(); } catch (Exception ex) { } }