private void gridView2_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { Model.Technologydetails td = this.bindingSource1.Current as Model.Technologydetails; if (td != null) { td.SunhaoRange = this.InstallSunhaoRage(); } }
/// <summary> /// Update a Technologydetails. /// </summary> public void Update(Model.Technologydetails technologydetails) { // // todo: add other logic here. // Validate(technologydetails); technologydetails.UpdateTime = DateTime.Now; accessor.Update(technologydetails); }
private void Validate(Model.Technologydetails technologydetails) { if (string.IsNullOrEmpty(technologydetails.ProceduresId)) { throw new Helper.RequireValueException(Model.Technologydetails.PROPERTY_PROCEDURESID); } if (string.IsNullOrEmpty(technologydetails.TechonlogyHeaderId)) { throw new Helper.RequireValueException(Model.Technologydetails.PROPERTY_TECHONLOGYHEADERID); } }
private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { Model.Technologydetails td = this.bindingSource1.Current as Model.Technologydetails; if (td != null) { this.AnalyticalSunhaoRage(td.SunhaoRange); } else { this.sunhaoList.Clear(); } this.gridControl2.RefreshDataSource(); }
/// <summary> /// Insert a Technologydetails. /// </summary> public void Insert(Model.Technologydetails technologydetails) { // // todo:add other logic here // //if (this.Exists(technologydetails.ProceduresId)) //{ // throw new Helper.InvalidValueException(Model.Technologydetails.PROPERTY_PROCEDURESID); //} //if (this.Exists(technologydetails.TechonlogyHeaderId)) //{ // throw new Helper.InvalidValueException(Model.Technologydetails.PROPERTY_PROCEDURESID); //} Validate(technologydetails); technologydetails.InsertTime = DateTime.Now; technologydetails.TechnologydetailsID = Guid.NewGuid().ToString(); accessor.Insert(technologydetails); }
private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) { if (e.ListSourceRowIndex < 0) { return; } IList <Model.Technologydetails> details = this.bindingSource1.DataSource as IList <Model.Technologydetails>; if (details == null || details.Count < 1) { return; } Model.Technologydetails detail = details[e.ListSourceRowIndex]; if (detail.Procedures == null) { return; } switch (e.Column.Name) { case "gridWorkhouse": e.DisplayText = detail.Procedures == null ? "" : detail.Procedures.WorkHouse.Workhousename; break; case "gridProcedures": e.DisplayText = detail.Procedures == null ? "" : detail.Procedures.Id; break; case "gridColumnStartDate": e.DisplayText = detail.Procedures.Startdate.HasValue ? detail.Procedures.Startdate.Value.ToShortDateString() : ""; break; case "gridColumnEndDate": e.DisplayText = detail.Procedures.Enddate.HasValue ? detail.Procedures.Enddate.Value.ToShortDateString() : ""; break; } }
public bool HasRowsBefore(Model.Technologydetails e) { return(accessor.HasRowsBefore(e)); }
public bool IsExists_TechnologydetailsNo(Model.Technologydetails tec) { return(accessor.IsExists_TechnologydetailsNo(tec)); }
public void Update(Model.Technologydetails e) { this.Update <Model.Technologydetails>(e); }
public bool IsExists_TechnologydetailsNo(Model.Technologydetails tec) { return(sqlmapper.QueryForObject <bool>("Technologydetails.IsExists_TechnologydetailsNo", tec.TechnologydetailsNo)); }
public Model.Technologydetails GetPrev(Model.Technologydetails e) { return(sqlmapper.QueryForObject <Model.Technologydetails>("Technologydetails.get_prev", e)); }
public Model.Technologydetails GetNext(Model.Technologydetails e) { return(sqlmapper.QueryForObject <Model.Technologydetails>("Technologydetails.get_next", e)); }
public bool HasRowsAfter(Model.Technologydetails e) { return(sqlmapper.QueryForObject <bool>("Technologydetails.has_rows_after", e)); }
public bool HasRowsBefore(Model.Technologydetails e) { return(sqlmapper.QueryForObject <bool>("Technologydetails.has_rows_before", e)); }
public bool HasRowsAfter(Model.Technologydetails e) { return(accessor.HasRowsAfter(e)); }
public Model.Technologydetails GetNext(Model.Technologydetails e) { return(accessor.GetNext(e)); }
public void Insert(Model.Technologydetails e) { this.Insert <Model.Technologydetails>(e); }