Esempio n. 1
0
 private bool insertAAGroup()
 {
     DTO.ST_income_and_expenditure_pattern newAAGroup = new DTO.ST_income_and_expenditure_pattern();
     newAAGroup.income_and_expenditure_pattern_id_custom = Convert.ToInt32(txt_AAGroupId.Text);
     newAAGroup.income_and_expenditure_pattern_name      = txt_AAGroupName.Text;
     return(AAGroupBus.insertAAGroup(newAAGroup));
 }
 public bool insertAAGroup(DTO.ST_income_and_expenditure_pattern AAgroup)
 {
     try
     {
         db.ST_income_and_expenditure_patterns.InsertOnSubmit(AAgroup);
         db.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
        public bool updateAAGroup(DTO.ST_income_and_expenditure_pattern updateAAGroup)
        {
            try
            {
                var updateVendor = db.ST_income_and_expenditure_patterns.Where(p => p.income_and_expenditure_pattern_id.Equals(updateAAGroup.income_and_expenditure_pattern_id)).SingleOrDefault();

                updateVendor.income_and_expenditure_pattern_id_custom = updateAAGroup.income_and_expenditure_pattern_id_custom;
                updateVendor.income_and_expenditure_pattern_name      = updateAAGroup.income_and_expenditure_pattern_name;


                db.SubmitChanges();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
 public bool updateAAGroup(DTO.ST_income_and_expenditure_pattern AAgroup)
 {
     return(AAG.updateAAGroup(AAgroup));
 }
 public bool insertAAGroup(DTO.ST_income_and_expenditure_pattern AAgroup)
 {
     return(AAG.insertAAGroup(AAgroup));
 }