示例#1
0
 private void _helper_DomainObjectToExportRow(object sender, EventArgs e)
 {
     if ((e as DomainObjectToExportRowEventArgsNew).DomainObject != null)
     {
         if (string.Compare(this.GetRequestParam("OperationCode").ToString(), "TS", true) != 0)
         {
             if (bool.Parse(this.ViewState["IsFQC"].ToString()))
             {
                 /* FQC */
                 OnWipInfoOnResource obj = (e as DomainObjectToExportRowEventArgsNew).DomainObject as OnWipInfoOnResource;
                 (e as DomainObjectToExportRowEventArgsNew).ExportRow =
                     new string[] {
                     this.txtItemCodeQuery.Text,
                     this.txtOperationCodeQuery.Text,
                     obj.SegmentCode,
                     FormatHelper.ToDateString(obj.ShiftDay),
                     obj.ShiftCode,
                     obj.StepSequenceCode,
                     obj.ResourceCode,
                     obj.MoCode,
                     obj.OnWipGoodQuantityOnResource.ToString(),
                     obj.OnWipNGQuantityOnResource.ToString(),
                     obj.NGForReworksQTY.ToString()
                 };
             }
             else
             {
                 /* 普通 */
                 OnWipInfoOnResource obj = (e as DomainObjectToExportRowEventArgsNew).DomainObject as OnWipInfoOnResource;
                 (e as DomainObjectToExportRowEventArgsNew).ExportRow =
                     new string[] {
                     this.txtItemCodeQuery.Text,
                     this.txtOperationCodeQuery.Text,
                     obj.SegmentCode,
                     FormatHelper.ToDateString(obj.ShiftDay),
                     obj.ShiftCode,
                     obj.StepSequenceCode,
                     obj.ResourceCode,
                     obj.MoCode,
                     obj.OnWipGoodQuantityOnResource.ToString(),
                     obj.OnWipNGQuantityOnResource.ToString()
                 };
             }
         }
         else
         {
             /* 维修 */
             OnWipInfoOnResource obj = (e as DomainObjectToExportRowEventArgsNew).DomainObject as OnWipInfoOnResource;
             (e as DomainObjectToExportRowEventArgsNew).ExportRow =
                 new string[] {
                 this.txtItemCodeQuery.Text,
                 this.txtOperationCodeQuery.Text,
                 obj.SegmentCode,
                 FormatHelper.ToDateString(obj.ShiftDay),
                 obj.ShiftCode,
                 obj.StepSequenceCode,
                 obj.ResourceCode,
                 obj.MoCode,
                 obj.TSConfirmQty.ToString(),
                 obj.TSQty.ToString(),
                 obj.TSReflowQty.ToString()
             };
         }
     }
 }
示例#2
0
        private void _helper_DomainObjectToGridRow(object sender, EventArgs e)
        {
            if ((e as DomainObjectToGridRowEventArgsNew).DomainObject != null)
            {
                if (string.Compare(this.GetRequestParam("OperationCode").ToString(), "TS", true) != 0)
                {
                    if (bool.Parse(this.ViewState["IsFQC"].ToString()))
                    {
                        /* FQC */
                        OnWipInfoOnResource obj = (e as DomainObjectToGridRowEventArgsNew).DomainObject as OnWipInfoOnResource;
                        DataRow             row = DtSource.NewRow();
                        row["SegmentCode"]                               = obj.SegmentCode;
                        row["ShiftDay"]                                  = FormatHelper.ToDateString(obj.ShiftDay);
                        row["ShiftCode"]                                 = obj.ShiftCode;
                        row["StepSequenceCode"]                          = obj.StepSequenceCode;
                        row["ResourceCode"]                              = obj.ResourceCode;
                        row["MoCode"]                                    = obj.MoCode;
                        row["OnWipGoodQuantityOnResource"]               = obj.OnWipGoodQuantityOnResource;
                        row["OnWipGoodDistributing"]                     = "";
                        row["OnWipNGQuantityOnResource"]                 = obj.OnWipNGQuantityOnResource;
                        row["OnWipNGDistributing"]                       = "";
                        row["OQCNGWaitForRework"]                        = obj.NGForReworksQTY;
                        row["OQCNGWaitForReworkDistributing"]            = "";
                        (e as DomainObjectToGridRowEventArgsNew).GridRow = row;
                    }
                    else
                    {
                        /* 普通 */
                        OnWipInfoOnResource obj = (e as DomainObjectToGridRowEventArgsNew).DomainObject as OnWipInfoOnResource;
                        DataRow             row = DtSource.NewRow();
                        row["SegmentCode"]      = obj.SegmentCode;
                        row["ShiftDay"]         = FormatHelper.ToDateString(obj.ShiftDay);
                        row["ShiftCode"]        = obj.ShiftCode;
                        row["StepSequenceCode"] = obj.StepSequenceCode;
                        row["ResourceCode"]     = obj.ResourceCode;
                        row["MoCode"]           = obj.MoCode;

                        row["OnWipGoodQuantityOnResource"] = obj.OnWipGoodQuantityOnResource;
                        row["OnWipGoodDistributing"]       = "";
                        row["OnWipNGQuantityOnResource"]   = obj.OnWipNGQuantityOnResource;
                        row["OnWipNGDistributing"]         = "";

                        (e as DomainObjectToGridRowEventArgsNew).GridRow = row;
                    }
                }
                else
                {
                    /* 维修 */
                    OnWipInfoOnResource obj = (e as DomainObjectToGridRowEventArgsNew).DomainObject as OnWipInfoOnResource;
                    DataRow             row = DtSource.NewRow();
                    row["SegmentCode"]              = obj.SegmentCode;
                    row["ShiftDay"]                 = FormatHelper.ToDateString(obj.ShiftDay);
                    row["ShiftCode"]                = obj.ShiftCode;
                    row["StepSequenceCode"]         = obj.StepSequenceCode;
                    row["ResourceCode"]             = obj.ResourceCode;
                    row["MoCode"]                   = obj.MoCode;
                    row["TSConfirmQty"]             = obj.TSConfirmQty;
                    row["TSConfirmQtyDistributing"] = "";
                    row["TSQty"]                   = obj.TSQty;
                    row["TSQtyDistributing"]       = "";
                    row["TSReflowQty"]             = obj.TSReflowQty;
                    row["TSReflowQtyDistributing"] = "";

                    (e as DomainObjectToGridRowEventArgsNew).GridRow = row;
                }
            }
        }