/// <summary> /// /// </summary> /// <param name="model"></param> public static void Update(FluctuationInsuranceModel model) { // int entity var entity = new hr_FluctuationInsurance(); // fill entity model.FillEntity(ref entity); hr_FluctuationInsuranceServices.Update(entity); }
/// <summary> /// /// </summary> /// <param name="model"></param> public static FluctuationInsuranceModel Create(FluctuationInsuranceModel model) { // init entity var entity = new hr_FluctuationInsurance(); // fill entity model.FillEntity(ref entity); // create return(new FluctuationInsuranceModel(hr_FluctuationInsuranceServices.Create(entity))); }
/// <summary> /// /// </summary> private void Insert() { try { hdfChonCanBo.Text = cbxChonCanBo.SelectedItem.Value; var fluctuation = new hr_FluctuationInsurance { RecordId = int.Parse(hdfChonCanBo.Text), //Type = rbDecrease.Checked, //Reason = txtReason.Text.Trim(), CreatedDate = DateTime.Now, EditedDate = DateTime.Now }; hr_FluctuationInsuranceServices.Create(fluctuation); } catch (Exception e) { Dialog.Alert("Có lỗi xảy ra trong quá trình thêm mới: {0}".FormatWith(e.Message)); } }