Exemplo n.º 1
0
 private void _helper_DomainObjectToGridRow(object sender, EventArgs e)
 {
     if ((e as DomainObjectToGridRowEventArgsNew).DomainObject != null)
     {
         OnWipInfoDistributing obj = (e as DomainObjectToGridRowEventArgsNew).DomainObject as OnWipInfoDistributing;
         if (string.Compare(this.ViewState["Status"].ToString(), "NG", true) == 0)
         {
             obj.ProductStatus = TSStatus.TSStatus_New;
         }
         DataRow row = DtSource.NewRow();
         row["WipHistroy"]      = "";
         row["RunningCard"]     = obj.RunningCard;
         row["ProductStatus"]   = this.languageComponent1.GetString(obj.ProductStatus);
         row["OperationResult"] = WebQueryHelper.GetOPResultLinkHtml2(this.languageComponent1,
                                                                      obj.Action,
                                                                      obj.RunningCard,
                                                                      obj.RunningCardSequence,
                                                                      this.txtMoCodeQuery.Text,
                                                                      this.Request.Url.PathAndQuery);
         row["IDMergeRule"]   = obj.IDMergeRule;
         row["MaintainDate"]  = FormatHelper.ToDateString(obj.MaintainDate);
         row["MaintainTime"]  = FormatHelper.ToTimeString(obj.MaintainTime);
         row["Operator"]      = obj.MaintainUser;
         row["translateCard"] = obj.TranslateCard;
         (e as DomainObjectToGridRowEventArgsNew).GridRow = row;
     }
 }
Exemplo n.º 2
0
 private void _helper_DomainObjectToExportRow(object sender, EventArgs e)
 {
     if ((e as DomainObjectToExportRowEventArgsNew).DomainObject != null)
     {
         if (string.Compare(this.txtOperationCodeQuery.Text, "TS", true) != 0)
         {
             OnWipInfoDistributing obj = (e as DomainObjectToExportRowEventArgsNew).DomainObject as OnWipInfoDistributing;
             (e as DomainObjectToExportRowEventArgsNew).ExportRow =
                 new string[] {
                 this.txtItemCodeQuery.Text,
                 this.txtOperationCodeQuery.Text,
                 this.txtResourceCodeQuery.Text,
                 this.txtMoCodeQuery.Text,
                 obj.RunningCard,
                 this.languageComponent1.GetString(obj.ProductStatus),
                 WebQueryHelper.GetOPResult(this.languageComponent1, obj.Action),
                 FormatHelper.ToDateString(obj.MaintainDate),
                 FormatHelper.ToTimeString(obj.MaintainTime),
                 obj.MaintainUser
             };
         }
         else
         {
             OnWipInfoDistributing obj = (e as DomainObjectToExportRowEventArgsNew).DomainObject as OnWipInfoDistributing;
             (e as DomainObjectToExportRowEventArgsNew).ExportRow =
                 new string[] {
                 this.txtItemCodeQuery.Text,
                 this.txtOperationCodeQuery.Text,
                 this.txtResourceCodeQuery.Text,
                 this.txtMoCodeQuery.Text,
                 obj.RunningCard,
                 this.languageComponent1.GetString(obj.ProductStatus),
                 this.languageComponent1.GetString("ItemTracing_ts"),
                 FormatHelper.ToDateString(obj.MaintainDate),
                 FormatHelper.ToTimeString(obj.MaintainTime),
                 obj.MaintainUser
             };
         }
     }
 }