Ejemplo n.º 1
0
 public bool SaveCaste(MST_CASTE mST_CASTE)
 {
     try
     {
         unitOfWork.CasteRepository.Create(mST_CASTE);
         unitOfWork.Save();
         return(true);
     }
     catch (Exception ex)
     { return(false); }
 }
Ejemplo n.º 2
0
        protected void btnSaveCaste_Click(object sender, EventArgs e)
        {
            MST_CASTE caste = new MST_CASTE();

            try
            {
                caste.CasteName   = txtCasteName.Text.Trim();
                caste.CasteType   = Convert.ToSByte(ddlCasteType.SelectedValue);
                caste.ReligionId  = Convert.ToInt32(ddlReligion.SelectedValue);
                caste.CreatedDate = DateTime.Now;
                casteModel.SaveCaste(caste);
                txtCasteName.Text         = "";
                ddlReligion.SelectedValue = "0";
                GetAllCaste();
            }
            catch (Exception ex)
            {
            }
        }