예제 #1
0
 private string GetCondition(BenQGuru.eMES.Domain.Alert.AlertBill alert)
 {
     if (alert.Operator == Operator_Old.BW)
     {
         return(string.Format(_alertConst.GetName(Operator_Old.BW), NumberHelper.TrimZero(alert.LowValue), NumberHelper.TrimZero(alert.UpValue)));
     }
     else
     {
         return(_alertConst.GetName(alert.Operator) + NumberHelper.TrimZero(alert.LowValue));
     }
 }
예제 #2
0
        protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            Infragistics.WebUI.UltraWebGrid.UltraGridRow ur;
            if (isResourceNG)
            {
                BenQGuru.eMES.Domain.Alert.AlertResBill alert = obj as BenQGuru.eMES.Domain.Alert.AlertResBill;
                if (alert == null)
                {
                    return(null);
                }
                ur = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                    new object[] { "false",
                                   alert.BillId.ToString(),
                                   alert.ItemCode,
                                   AlertMsg.GetAlertName(alert.AlertType, this.languageComponent1),
                                   AlertMsg.GetAlertName(alert.AlertItem, this.languageComponent1),
                                   alert.ResourceCode,
                                   alert.ErrorGroup2Code,
                                   alert.StartNum.ToString(),
                                   GetCondition(alert),
                                   FormatHelper.ToDateString(alert.ValidDate),
                                   alert.MailNotify == "Y"?"是":"否",
                                   "" });
            }
            else
            {
                BenQGuru.eMES.Domain.Alert.AlertBill alert = obj as BenQGuru.eMES.Domain.Alert.AlertBill;
                if (alert == null)
                {
                    return(null);
                }
                ur = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                    new object[] { "false",
                                   alert.BillId.ToString(),
                                   alert.ItemCode,
                                   AlertMsg.GetAlertName(alert.AlertType, this.languageComponent1),
                                   AlertMsg.GetAlertName(alert.AlertItem, this.languageComponent1),
                                   alert.ProductCode,
                                   alert.StartNum.ToString(),
                                   GetCondition(alert),
                                   FormatHelper.ToDateString(alert.ValidDate),
                                   alert.MailNotify == "Y"?"是":"否",
                                   "" });
            }

            return(ur);
        }
예제 #3
0
 protected override string[] FormatExportRecord(object obj)
 {
     BenQGuru.eMES.Domain.Alert.AlertBill alert = obj as BenQGuru.eMES.Domain.Alert.AlertBill;
     if (alert != null)
     {
         return(new string[] {
             alert.ItemCode,
             AlertMsg.GetAlertName(alert.AlertType, this.languageComponent1),
             alert.StartNum.ToString(),
             GetCondition(alert),
             FormatHelper.ToDateString(alert.ValidDate),
             alert.MailNotify == "Y"?"是":"否"
         });
     }
     else
     {
         return(null);
     }
 }