Exemple #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();
     }
 }
Exemple #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);
 }
Exemple #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);
     }
 }
Exemple #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();
 }
Exemple #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);
 }
Exemple #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;
            }
        }
 public bool HasRowsBefore(Model.Technologydetails e)
 {
     return(accessor.HasRowsBefore(e));
 }
Exemple #8
0
 public bool IsExists_TechnologydetailsNo(Model.Technologydetails tec)
 {
     return(accessor.IsExists_TechnologydetailsNo(tec));
 }
Exemple #9
0
 public void Update(Model.Technologydetails e)
 {
     this.Update <Model.Technologydetails>(e);
 }
Exemple #10
0
 public bool IsExists_TechnologydetailsNo(Model.Technologydetails tec)
 {
     return(sqlmapper.QueryForObject <bool>("Technologydetails.IsExists_TechnologydetailsNo", tec.TechnologydetailsNo));
 }
Exemple #11
0
 public Model.Technologydetails GetPrev(Model.Technologydetails e)
 {
     return(sqlmapper.QueryForObject <Model.Technologydetails>("Technologydetails.get_prev", e));
 }
Exemple #12
0
 public Model.Technologydetails GetNext(Model.Technologydetails e)
 {
     return(sqlmapper.QueryForObject <Model.Technologydetails>("Technologydetails.get_next", e));
 }
Exemple #13
0
 public bool HasRowsAfter(Model.Technologydetails e)
 {
     return(sqlmapper.QueryForObject <bool>("Technologydetails.has_rows_after", e));
 }
Exemple #14
0
 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));
 }
Exemple #17
0
 public void Insert(Model.Technologydetails e)
 {
     this.Insert <Model.Technologydetails>(e);
 }