예제 #1
0
 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();
     }
 }
예제 #2
0
 /// <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);
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
 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();
 }
예제 #5
0
 /// <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);
 }
예제 #6
0
        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;
            }
        }
예제 #7
0
 public bool HasRowsBefore(Model.Technologydetails e)
 {
     return(accessor.HasRowsBefore(e));
 }
예제 #8
0
 public bool IsExists_TechnologydetailsNo(Model.Technologydetails tec)
 {
     return(accessor.IsExists_TechnologydetailsNo(tec));
 }
예제 #9
0
 public void Update(Model.Technologydetails e)
 {
     this.Update <Model.Technologydetails>(e);
 }
예제 #10
0
 public bool IsExists_TechnologydetailsNo(Model.Technologydetails tec)
 {
     return(sqlmapper.QueryForObject <bool>("Technologydetails.IsExists_TechnologydetailsNo", tec.TechnologydetailsNo));
 }
예제 #11
0
 public Model.Technologydetails GetPrev(Model.Technologydetails e)
 {
     return(sqlmapper.QueryForObject <Model.Technologydetails>("Technologydetails.get_prev", e));
 }
예제 #12
0
 public Model.Technologydetails GetNext(Model.Technologydetails e)
 {
     return(sqlmapper.QueryForObject <Model.Technologydetails>("Technologydetails.get_next", e));
 }
예제 #13
0
 public bool HasRowsAfter(Model.Technologydetails e)
 {
     return(sqlmapper.QueryForObject <bool>("Technologydetails.has_rows_after", e));
 }
예제 #14
0
 public bool HasRowsBefore(Model.Technologydetails e)
 {
     return(sqlmapper.QueryForObject <bool>("Technologydetails.has_rows_before", e));
 }
예제 #15
0
 public bool HasRowsAfter(Model.Technologydetails e)
 {
     return(accessor.HasRowsAfter(e));
 }
예제 #16
0
 public Model.Technologydetails GetNext(Model.Technologydetails e)
 {
     return(accessor.GetNext(e));
 }
예제 #17
0
 public void Insert(Model.Technologydetails e)
 {
     this.Insert <Model.Technologydetails>(e);
 }