| | |
| | | if (this.View.OpenParameter.GetCustomParameter("FHMainICMOInterID") == null) |
| | | { |
| | | SearchList(); |
| | | ChangeColor(); |
| | | } |
| | | else |
| | | { |
| | |
| | | this.Model.SetValue("FOwnerId", dt.Rows[i]["FOwnerId"], i);//货主 |
| | | } |
| | | } |
| | | did = true; |
| | | |
| | | ChangeColor(); |
| | | did = true; |
| | | } |
| | | } |
| | | public override void AfterBindData(EventArgs e) |
| | | { |
| | | base.AfterBindData(e); |
| | | //获取单据体信息 |
| | | //Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity"); |
| | | ////单据体信息转换为列表集合 |
| | | //DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity); |
| | | //EntryGrid grid = this.View.GetControl<EntryGrid>("FEntity"); |
| | | //int i = 0; |
| | | //foreach (DynamicObject current in entityDataObjoct) |
| | | //{ |
| | | // if (Convert.ToString(current["FCompleteDetailStatus"]) == "未齐套") |
| | | // { |
| | | // grid.SetBackcolor("FEntity", "#FF0000", i); |
| | | // } |
| | | // i++; |
| | | //} |
| | | //this.View.UpdateView(); |
| | | } |
| | | |
| | | private void ChangeColor() { |
| | | Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity"); |
| | | //单据体信息转换为列表集合 |
| | | DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity); |
| | | EntryGrid grid = this.View.GetControl<EntryGrid>("FEntity"); |
| | | int _i = 0; |
| | | foreach (DynamicObject current in entityDataObjoct) |
| | | { |
| | | if (Convert.ToString(current["FCompleteDetailStatus"]) == "未齐套") |
| | | { |
| | | grid.SetRowBackcolor("#FF0000", _i); |
| | | } |
| | | _i++; |
| | | } |
| | | } |
| | | |
| | | public override void BarItemClick(BarItemClickEventArgs e) |
| | | { |
| | | base.BarItemClick(e); |
| | | if (e.BarItemKey.ToUpper() == "TBFILTER") |
| | | { |
| | | SearchList(); |
| | | ChangeColor(); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | sql += sqlwhere; |
| | | sql += "order by FPlanDate, FHStockQty desc ,FHMaterID"; |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(this.Context, sql).Tables[0]; |
| | | this.Model.DeleteEntryData("FEntity"); |
| | | //this.Model.DeleteEntryData("FEntity"); |
| | | while (this.Model.GetEntryRowCount("FEntity") > 0) |
| | | { |
| | | this.Model.DeleteEntryRow("FEntity", 0); |
| | | } |
| | | //this.View.Refresh(); |
| | | |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | |
| | | this.Model.SetValue("FOwnerId", dt.Rows[i]["FOwnerId"], i);//货主 |
| | | } |
| | | } |
| | | this.View.UpdateView(); |
| | | |
| | | //this.View.UpdateView(); |
| | | did = true; |
| | | } |
| | | } |