Inheritance: MonoBehaviour
Esempio n. 1
0
 protected void btnHello_Click(object sender, EventArgs e)
 {
     Alert alert = new Alert();
     alert.Message = "你好 FineUI!";
     alert.Icon = Icon.Book;
     alert.Show();
 }
        public AlertPage()
        {
            // Set Page Navigation
            Title = "Alert!";

            alert = new Alert ();

            // Create Screen Elements
            var button = new Button {
                Text = "Send Test Alert",
                TextColor = Color.White,
                BackgroundColor = Color.Red,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                MinimumHeightRequest = 100

            };
            button.Clicked += (sender, e) => { fakeAlert(); };

            // Create Screen Content
            Content = new ContentView {
                Content = new StackLayout {
                    Children = {
                        button
                    }
                }
            };
        }
Esempio n. 3
0
 private void Init()
 {
     account = _userSession.CurrentUser;
     alert = new Alert();
     alert.AccountID = account.AccountID;
     alert.CreateDate = DateTime.Now;
 }
Esempio n. 4
0
        /// <summary>
        /// Creates the alert.
        /// </summary>
        /// <returns>Object of Alert</returns>
        public static Alert CreateAlerts(string alertType)
        {
            if (string.IsNullOrEmpty(alertType))
            {
                return null;
            }

            Alert alertDetail = new Alert();

            alertDetail.Message = new Message();
            if (alertType.Equals(Folio, StringComparison.OrdinalIgnoreCase))
            {
                CreateFolioAlert(alertDetail);
            }
            else if (alertType.Equals(NotCheckedIn, StringComparison.OrdinalIgnoreCase))
            {
                CreateNotCheckedInAlert(alertDetail);
            }
            else if (alertType.Equals(AuthorizationAlert, StringComparison.OrdinalIgnoreCase))
            {
                CreateAuthorizationAlert(alertDetail);
            }
            else if (alertType.Equals(PortManning, StringComparison.OrdinalIgnoreCase))
            {
                CreatePortManningAlert(alertDetail);
            }

            alertDetail.AddedDateTime = workstation.CurrentDateTime;
            return alertDetail;
        }
Esempio n. 5
0
 private void Init(Account modifiedAccount)
 {
     account = modifiedAccount;
     alert = new Alert();
     alert.AccountID = account.AccountID;
     alert.CreateDate = DateTime.Now;
 }
Esempio n. 6
0
        public void IdentifierWithValidNameIsValid()
        {
            var alert = new Alert();
            alert.Identifier = "43b080713727";

            var identifierValidator = new IdentifierValidator(alert);
            Assert.True(identifierValidator.IsValid);
        }
Esempio n. 7
0
 public override bool Equals(Alert other)
 {
     if (other is MissingIqnAlert)
     {
         return Host.opaque_ref == ((MissingIqnAlert)other).Host.opaque_ref;
     }
     return base.Equals(other);
 }
        public void AlertWithStatusWellDefinedIsValid()
        {
            var alert = new Alert();
            alert.Status = Status.Draft;

            var statusRequiredValidator = new StatusRequiredValidator(alert);
            Assert.True(statusRequiredValidator.IsValid);
        }
 public AlertDetailForm(Alert alert)
 {
     InitializeComponent();
     DetailDataGrid.DataSource = alert.table;
     DetailDataGrid.AutoResizeColumns();
     DetailTextBox.Text = alert.rule.ToString();
     alertRef = alert;
 }
        public void AlertWithEmptyAddressesAndScopePrivateIsInvalid()
        {
            var alert = new Alert();
            alert.Scope = Scope.Private;

            var addressesRequiredWhenScopeValidator = new AddressesRequiredWhenScopePrivateValidator(alert);
            Assert.False(addressesRequiredWhenScopeValidator.IsValid);
        }
Esempio n. 11
0
 public override bool Equals(Alert other)
 {
     if (other is DuplicateIqnAlert)
     {
         return Host.opaque_ref == ((DuplicateIqnAlert)other).Host.opaque_ref;
     }
     return base.Equals(other);
 }
Esempio n. 12
0
        public void AlertWithoutSentIsInvalid()
        {
            var alert = new Alert();
            alert.Sent = null;

            var sentRequiredValidator = new SentRequiredValidator(alert);
            Assert.False(sentRequiredValidator.IsValid);
        }
 protected void Select_Record(object sender, EventArgs e)
 {
     Alert = Alert.Select(Convert.ToInt32(GridView1.SelectedValue));
     Alert_ID_TextBox.Text = Convert.ToString(Alert.Alert_ID);
     Alert_Message_TextBox.Text = Convert.ToString(Alert.Alert_Message);
     Alert_Type_TextBox.Text = Convert.ToString(Alert.Alert_Type);
     //Alert_Desc_RadioBtn.Checked = ?
 }
 protected void INSERT(object sender, EventArgs e)
 {
     //NOOOO Alert.Alert_ID = Convert.ToInt32(Alert_ID_TextBox.Text);
     Alert.Alert_Message = Alert_Message_TextBox.Text;
     Alert.Alert_Type = Alert_Type_TextBox.Text;
     //Alert_Desc_RadioBtn.Checked = ?
     Alert = Alert.Insert(Alert);
 }
Esempio n. 15
0
 protected void btnHello2_Click(object sender, EventArgs e)
 {
     Alert alert = new Alert();
     alert.Message = "你好 FineUI!";
     alert.IconUrl = "~/images/success.png";
     alert.Target = Target.Top;
     alert.Show();
 }
        public void AlertWithScopeWellDefinedIsValid()
        {
            var alert = new Alert();
            alert.Scope = Scope.Public;

            var scopeRequiredValidator = new ScopeRequiredValidator(alert);
            Assert.True(scopeRequiredValidator.IsValid);
        }
        public void AlertWithMessageTypeWellDefinedIsValid()
        {
            var alert = new Alert();
            alert.MessageType = MessageType.Ack;

            var messageTypeRequiredValidator = new MessageTypeRequiredValidator(alert);
            Assert.True(messageTypeRequiredValidator.IsValid);
        }
        public void AlertWithIdentifierNotNullIsValid()
        {
            var alert = new Alert();
            alert.Identifier = "43b080713727";

            var identifierRequiredValidator = new IdentifierRequiredValidator(alert);
            Assert.True(identifierRequiredValidator.IsValid);
        }
        public void AlertWithIdentifierNullIsInvalid()
        {
            var alert = new Alert();
            alert.Identifier = null;

            var identifierRequiredValidator = new IdentifierRequiredValidator(alert);
            Assert.False(identifierRequiredValidator.IsValid);
        }
Esempio n. 20
0
        public void AlertWithSentIsValid()
        {
            var alert = new Alert();
            alert.Sent = new DateTimeOffset(2008, 5, 1, 8, 6, 32,
                                 new TimeSpan(1, 0, 0));

            var sentRequiredValidator = new SentRequiredValidator(alert);
            Assert.True(sentRequiredValidator.IsValid);
        }
        public void SenderWithValidNameIsValid()
        {
            var alert = new Alert();
            alert.Sender = "*****@*****.**";

            var senderValidator = new SenderRequiredValidator(alert);
            Assert.True(senderValidator.IsValid);
            Assert.Equal(0, senderValidator.Errors.Count());
        }
        public void AlertWithScopeWrongDefinedIsInvalid()
        {
            var alert = new Alert();
            alert.Scope = (Scope)123;

            var scopeRequiredValidator = new ScopeRequiredValidator(alert);
            Assert.False(scopeRequiredValidator.IsValid);
            Assert.Equal(typeof(ScopeRequiredError), scopeRequiredValidator.Errors.ElementAt(0).GetType());
        }
        public void AlertWithMessageTypeWrongDefinedIsInvalid()
        {
            var alert = new Alert();
            alert.MessageType = (MessageType)123;

            var messageTypeRequiredValidator = new MessageTypeRequiredValidator(alert);
            Assert.False(messageTypeRequiredValidator.IsValid);
            Assert.Equal(typeof(MessageTypeRequiredError), messageTypeRequiredValidator.Errors.ElementAt(0).GetType());
        }
        public void SenderWithNullNameIsInvalid()
        {
            var alert = new Alert();
            alert.Sender = null;

            var senderValidator = new SenderRequiredValidator(alert);
            Assert.False(senderValidator.IsValid);
            Assert.Equal(typeof(SenderRequiredError), senderValidator.Errors.ElementAt(0).GetType());
        }
        public static Alert GenerateAlert(NotificationType Type, string Message)
        {
            Alert Alert = new Alert();

            Alert.Type = GetNotificationType(Type);
            Alert.Message = Message;

            return Alert;
        }
Esempio n. 26
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="alert"></param>
        /// <returns></returns>
        private IEnumerable<Error> GetErrors(Alert alert)
        {
            var alertValidator = from type in Assembly.GetExecutingAssembly().GetTypes()
                                 where typeof(Validator<Alert>).IsAssignableFrom(type)
                                 select (Validator<Alert>)Activator.CreateInstance(type, alert);

            return from validator in alertValidator
                   from error in validator.Errors
                   select error;
        }
Esempio n. 27
0
        public void IdentifierWithCommaIsInvalid()
        {
            var alert = new Alert();
            alert.Identifier = "43b080713727,";

            var identifierValidator = new IdentifierValidator(alert);
            Assert.False(identifierValidator.IsValid);
            Assert.Equal(typeof(IdentifierError), identifierValidator.Errors.ElementAt(0).GetType());
            Assert.Equal(1, identifierValidator.Errors.Count());
        }
Esempio n. 28
0
 public void FromDomainObject(Alert alert)
 {
     AlertID = alert.AlertId;
     Custom = alert.Custom;
     Processed = alert.Processed;
     TriggerTime = alert.TriggerTime;
     AlertType = alert.Type.ToName();
     Description = alert.Description;
     AuctionID = alert.AuctionId;
 }
        public override void SendAlert(Alert alert, Action<bool> callback)
        {
            var url = serverUrl + "/alert";
            NameValueCollection collection = DictionaryToNameValue (alert.ToDictionary ()) as NameValueCollection;
            collection.Add ("to", toPhoneNumber); // for testing different phones

            Post (url, collection, (err,data) => {
                callback(err == null);
            });
        }
        public void AlertWithAddressAndNoScopeIsValid()
        {
            var alert = new Alert();
            alert.Addresses.Add("list1");
            alert.Addresses.Add("list2");
            alert.Addresses.Add("list3");

            var addressesRequiredWhenScopeValidator = new AddressesRequiredWhenScopePrivateValidator(alert);
            Assert.True(addressesRequiredWhenScopeValidator.IsValid);
        }
Esempio n. 31
0
 public bool validateData()
 {
     if (txtPName.Text == "")
     {
         txtPName.Focus();
         lblMessage.Text = "Please fill the Project Name";
         Alert.show("Please fill the Project Name");
         return(false);
     }
     else if (ddlSArea.SelectedValue == "")
     {
         ddlSArea.Focus();
         lblMessage.Text = "Please select the Area";
         Alert.show("Please select the Area");
         return(false);
     }
     else if (ddlPPRMinType.SelectedValue == "")
     {
         ddlPPRMinType.Focus();
         lblMessage.Text = "Please select the PPR Type";
         Alert.show("Please select the PPR Type");
         return(false);
     }
     else if (ddlAgency.SelectedValue == "")
     {
         ddlAgency.Focus();
         lblMessage.Text = "Please select the Agency";
         Alert.show("Please select the Agency");
         return(false);
     }
     else if (txtISD.Text == "")
     {
         txtISD.Focus();
         lblMessage.Text = "Please fill the institutional structure for delivery";
         Alert.show("Please fill the institutional structure for delivery");
         return(false);
     }
     else if (txtBDP.Text == "")
     {
         txtBDP.Focus();
         lblMessage.Text = "Please fill the Goals and objective";
         Alert.show("Please fill the Goals and objective");
         return(false);
     }
     else if (txtAI.Text == "")
     {
         txtAI.Focus();
         lblMessage.Text = "Please fill the output of the project";
         Alert.show("Please fill the output of the project");
         return(false);
     }
     else if (txtOutPutP.Text == "")
     {
         txtOutPutP.Focus();
         return(false);
     }
     else if (txtOutComeP.Text == "")
     {
         txtOutComeP.Focus();
         return(false);
     }
     else
     {
         return(true);
     }
 }
 public static Alert WithTriggerDateTime(this Alert alert, DateTime triggerDateTime)
 {
     alert.TriggerDateTime = triggerDateTime;
     return(alert);
 }
 public static Alert WithStatus(this Alert alert, String status)
 {
     alert.Status = status;
     return(alert);
 }
 private async Task OnQuoteToOrder()
 {
     await Alert.ShowMessage("Coming soon");
 }
 public static Alert WithTriggerValue(this Alert alert, String triggerValue)
 {
     alert.TriggerValue = triggerValue;
     return(alert);
 }
Esempio n. 36
0
        public void Alert(string msg, Alert.enmType type)
        {
            Alert frm = new Alert();

            frm.showAlert(msg, type);
        }
Esempio n. 37
0
 /// <summary>
 /// Raise the alert event.
 /// </summary>
 /// <remarks>
 /// Raises the alert event.
 /// </remarks>
 /// <param name="message">The alert message.</param>
 /// <exception cref="System.ArgumentNullException">
 /// <paramref name="message"/> is <c>null</c>.
 /// </exception>
 protected virtual void OnAlert(string message)
 {
     Alert?.Invoke(this, new AlertEventArgs(message));
 }
Esempio n. 38
0
        protected void trbBARCODE_TriggerClick(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(docDEPTID.SelectedValue))
            {
                Alert.Show("请选择申领库房!", "提示信息", MessageBoxIcon.Warning);
                trbBARCODE.Text = "";
                trbBARCODE.Focus();
                return;
            }
            if (docDEPTID.SelectedValue == docDEPTOUT.SelectedValue)
            {
                Alert.Show("同一库房不需要调拨!", "提示信息", MessageBoxIcon.Warning);
                trbBARCODE.Text = "";
                trbBARCODE.Focus();
                return;
            }
            //扫码出库
            if (trbBARCODE.Text.Length < Doc.LENCODE())
            {
                return;
            }
            List <Dictionary <string, object> > newDict = GridGoods.GetNewAddedList();

            for (int i = 0; i < newDict.Count; i++)
            {
                if (newDict[i]["STR2"].ToString() == trbBARCODE.Text.Trim())
                {
                    Alert.Show("扫描条码已增加到单据中!", "提示信息", MessageBoxIcon.Warning);
                    trbBARCODE.Text = "";
                    trbBARCODE.Focus();
                    return;
                }
            }
            DataTable dtCode = DbHelperOra.Query(String.Format("SELECT DEPTCUR,DEPTID,GDSEQ FROM DAT_GZ_EXT WHERE UPPER(ONECODE) = UPPER('{0}') OR UPPER(STR1) = UPPER('{0}')", trbBARCODE.Text)).Tables[0];

            if (dtCode == null || dtCode.Rows.Count < 1)
            {
                Alert.Show("系统中不存在条码【" + trbBARCODE.Text.Trim() + "】!", "提示信息", MessageBoxIcon.Warning);
                trbBARCODE.Text = "";
                trbBARCODE.Focus();
                return;
            }
            string dept  = dtCode.Rows[0]["DEPTCUR"].ToString();//Doc.ONECODE_GZ(trbBARCODE.Text.Trim(), "DEPTCUR");
            string keshi = dtCode.Rows[0]["DEPTID"].ToString();
            string gdseq = dtCode.Rows[0]["GDSEQ"].ToString();

            if (docDEPTOUT.SelectedValue.Length > 0)
            {
                if (docDEPTOUT.SelectedValue != dept)
                {
                    Alert.Show("条码【" + trbBARCODE.Text.Trim() + "】不属于库房【" + docDEPTOUT.SelectedText + "】", "提示信息", MessageBoxIcon.Warning);
                    trbBARCODE.Text = "";
                    trbBARCODE.Focus();
                    return;
                }
            }
            else
            {
                docDEPTOUT.SelectedValue = dept;
                if (docDEPTOUT.Text.Length < 1)
                {
                    Alert.Show("扫描条码的库房不存在或条码已被使用!");
                    docDEPTOUT.SelectedValue = "";
                    trbBARCODE.Text          = "";
                    trbBARCODE.Focus();
                    return;
                }
            }

            if (!string.IsNullOrWhiteSpace(keshi))
            {
                if (docDEPTID.SelectedValue != keshi)
                {
                    Alert.Show("条码【" + trbBARCODE.Text.Trim() + "】不属于库房【" + docDEPTID.SelectedText + "】!", "提示信息", MessageBoxIcon.Warning);
                    trbBARCODE.Text = "";
                    trbBARCODE.Focus();
                    return;
                }
            }
            else
            {
                if (!DbHelperOra.Exists(string.Format("SELECT 1 FROM DOC_GOODSCFG WHERE DEPTID='{0}' AND GDSEQ='{1}' AND ISCFG='Y'", docDEPTID.SelectedValue, gdseq)))
                {
                    Alert.Show("条码【" + trbBARCODE.Text.Trim() + "】不属于库房【" + docDEPTID.SelectedText + "】!", "提示信息", MessageBoxIcon.Warning);
                    trbBARCODE.Text = "";
                    trbBARCODE.Focus();
                    return;
                }
            }
            docDEPTOUT.Enabled = false;
            docDEPTID.Enabled  = false;
            //增加商品
            //信息赋值
            DataTable dt = DbHelperOra.Query("SELECT A.* FROM DAT_GZ_EXT A WHERE (UPPER(A.ONECODE) = UPPER('" + trbBARCODE.Text.Trim() + "') OR UPPER(A.STR1) = UPPER('" + trbBARCODE.Text.Trim() + "')) AND FLAG IN('Y','R')").Tables[0];

            if (dt.Rows.Count < 1)
            {
                Alert.Show("扫描条码未入库或已被使用!", "提示信息", MessageBoxIcon.Warning);
                trbBARCODE.Text = "";
                trbBARCODE.Focus();
                return;
            }
            DataTable dt_goods = Doc.GetGoods_His(gdseq, "", dept);
            int       index    = 0;

            if (hdfRowIndex.Text.Trim().Length > 0)
            {
                index = int.Parse(hdfRowIndex.Text);
            }
            else
            {
                index = 1;
            }

            if (dt_goods != null && dt_goods.Rows.Count > 0)
            {
                dt_goods.Columns.Add("BZSL", Type.GetType("System.Int32"));
                dt_goods.Columns.Add("HSJE", Type.GetType("System.Double"));
                dt_goods.Columns.Add("STR2", Type.GetType("System.String"));
                dt_goods.Columns.Add("ROWNO", Type.GetType("System.Int32"));
                DataRow dr_goods = dt_goods.Rows[0];
                dr_goods["BZSL"]  = "1";
                dr_goods["BZHL"]  = "1";
                dr_goods["STR2"]  = trbBARCODE.Text.Trim().ToUpper();
                dr_goods["HSJE"]  = dr_goods["HSJJ"];
                dr_goods["PH"]    = dt.Rows[0]["PH"];
                dr_goods["YXQZ"]  = dt.Rows[0]["YXQZ"];
                dr_goods["RQ_SC"] = dt.Rows[0]["RQ_SC"];
                dr_goods["ROWNO"] = index;
                LoadGridRow(dr_goods, false);
                index++;
                hdfRowIndex.Text = index.ToString();
            }
            else
            {
                Alert.Show(string.Format("{0}尚未配置商品【{1}】!!!", docDEPTID.SelectedText, gdseq), MessageBoxIcon.Warning);
            }
            trbBARCODE.Text = "";
            trbBARCODE.Focus();
        }
Esempio n. 39
0
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            OperationResult objOperationResult = new OperationResult();
            ServiceBL       _serviceBL         = new ServiceBL();

            Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList        serviceComponentFieldValues      = null;
            Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList             serviceComponentFields           = null;
            List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList> _serviceComponentFieldValuesList = null;
            List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList>      _serviceComponentFieldsList      = null;

            if (_serviceComponentFieldsList == null)
            {
                _serviceComponentFieldsList = new List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList>();
            }



            //Rítmo**-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-
            serviceComponentFields = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList();

            serviceComponentFields.v_ComponentFieldsId  = Constants.ELECTROCARDIOGRAMA_ONDA_P_ID;
            serviceComponentFields.v_ServiceComponentId = Session["ServiceComponentId"].ToString();

            _serviceComponentFieldValuesList = new List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList>();
            serviceComponentFieldValues      = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList();

            serviceComponentFieldValues.v_ComponentFieldValuesId = null;
            serviceComponentFieldValues.v_Value1 = dllRitmo.SelectedValue.ToString();
            _serviceComponentFieldValuesList.Add(serviceComponentFieldValues);

            serviceComponentFields.ServiceComponentFieldValues = _serviceComponentFieldValuesList;

            // Agregar a mi lista
            _serviceComponentFieldsList.Add(serviceComponentFields);


            //Frecuencia**-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-
            serviceComponentFields = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList();

            serviceComponentFields.v_ComponentFieldsId  = Constants.ELECTROCARDIOGRAMA_RITMO_SINUAL_ID;
            serviceComponentFields.v_ServiceComponentId = Session["ServiceComponentId"].ToString();

            _serviceComponentFieldValuesList = new List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList>();
            serviceComponentFieldValues      = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList();

            serviceComponentFieldValues.v_ComponentFieldValuesId = null;
            serviceComponentFieldValues.v_Value1 = txtFrecuencia.Text;
            _serviceComponentFieldValuesList.Add(serviceComponentFieldValues);

            serviceComponentFields.ServiceComponentFieldValues = _serviceComponentFieldValuesList;

            // Agregar a mi lista
            _serviceComponentFieldsList.Add(serviceComponentFields);



            //SEGMENTO PR**-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-
            serviceComponentFields = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList();

            serviceComponentFields.v_ComponentFieldsId  = Constants.ELECTROCARDIOGRAMA_INTERVALO_PR_ID;
            serviceComponentFields.v_ServiceComponentId = Session["ServiceComponentId"].ToString();

            _serviceComponentFieldValuesList = new List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList>();
            serviceComponentFieldValues      = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList();

            serviceComponentFieldValues.v_ComponentFieldValuesId = null;
            serviceComponentFieldValues.v_Value1 = txtSegPR.Text;
            _serviceComponentFieldValuesList.Add(serviceComponentFieldValues);

            serviceComponentFields.ServiceComponentFieldValues = _serviceComponentFieldValuesList;

            // Agregar a mi lista
            _serviceComponentFieldsList.Add(serviceComponentFields);



            //ONDA QRS**-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-
            serviceComponentFields = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList();

            serviceComponentFields.v_ComponentFieldsId  = Constants.ELECTROCARDIOGRAMA_COMPLEJO_QRS_ANORMAL_ID;
            serviceComponentFields.v_ServiceComponentId = Session["ServiceComponentId"].ToString();

            _serviceComponentFieldValuesList = new List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList>();
            serviceComponentFieldValues      = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList();

            serviceComponentFieldValues.v_ComponentFieldValuesId = null;
            serviceComponentFieldValues.v_Value1 = txtOndaQRS.Text;
            _serviceComponentFieldValuesList.Add(serviceComponentFieldValues);

            serviceComponentFields.ServiceComponentFieldValues = _serviceComponentFieldValuesList;

            // Agregar a mi lista
            _serviceComponentFieldsList.Add(serviceComponentFields);



            //SEGEMENTO QT**-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-
            serviceComponentFields = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList();

            serviceComponentFields.v_ComponentFieldsId  = Constants.ELECTROCARDIOGRAMA_INTERVALO_QT_ID;
            serviceComponentFields.v_ServiceComponentId = Session["ServiceComponentId"].ToString();

            _serviceComponentFieldValuesList = new List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList>();
            serviceComponentFieldValues      = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList();

            serviceComponentFieldValues.v_ComponentFieldValuesId = null;
            serviceComponentFieldValues.v_Value1 = txtSegQT.Text;
            _serviceComponentFieldValuesList.Add(serviceComponentFieldValues);

            serviceComponentFields.ServiceComponentFieldValues = _serviceComponentFieldValuesList;

            // Agregar a mi lista
            _serviceComponentFieldsList.Add(serviceComponentFields);



            //EJE ORS**-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-
            serviceComponentFields = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList();

            serviceComponentFields.v_ComponentFieldsId  = Constants.ELECTROCARDIOGRAMA_OTROS2_ID;
            serviceComponentFields.v_ServiceComponentId = Session["ServiceComponentId"].ToString();

            _serviceComponentFieldValuesList = new List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList>();
            serviceComponentFieldValues      = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList();

            serviceComponentFieldValues.v_ComponentFieldValuesId = null;
            serviceComponentFieldValues.v_Value1 = txtEjeORS.Text;
            _serviceComponentFieldValuesList.Add(serviceComponentFieldValues);

            serviceComponentFields.ServiceComponentFieldValues = _serviceComponentFieldValuesList;

            // Agregar a mi lista
            _serviceComponentFieldsList.Add(serviceComponentFields);



            //CONCLUSIONES**-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-
            serviceComponentFields = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList();

            serviceComponentFields.v_ComponentFieldsId  = Constants.ELECTROCARDIOGRAMA_ONDA_T_ID;
            serviceComponentFields.v_ServiceComponentId = Session["ServiceComponentId"].ToString();

            _serviceComponentFieldValuesList = new List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList>();
            serviceComponentFieldValues      = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList();

            serviceComponentFieldValues.v_ComponentFieldValuesId = null;
            serviceComponentFieldValues.v_Value1 = dllConclusiones.SelectedValue.ToString();
            _serviceComponentFieldValuesList.Add(serviceComponentFieldValues);

            serviceComponentFields.ServiceComponentFieldValues = _serviceComponentFieldValuesList;

            // Agregar a mi lista
            _serviceComponentFieldsList.Add(serviceComponentFields);



            //DESCRIPCIÓN**-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-
            serviceComponentFields = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldsList();

            serviceComponentFields.v_ComponentFieldsId  = Constants.ELECTROCARDIOGRAMA_DESCRIPCION_ID;
            serviceComponentFields.v_ServiceComponentId = Session["ServiceComponentId"].ToString();

            _serviceComponentFieldValuesList = new List <Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList>();
            serviceComponentFieldValues      = new Sigesoft.Node.WinClient.BE.ServiceComponentFieldValuesList();

            serviceComponentFieldValues.v_ComponentFieldValuesId = null;
            serviceComponentFieldValues.v_Value1 = txtDescripcion.Text;
            _serviceComponentFieldValuesList.Add(serviceComponentFieldValues);

            serviceComponentFields.ServiceComponentFieldValues = _serviceComponentFieldValuesList;

            // Agregar a mi lista
            _serviceComponentFieldsList.Add(serviceComponentFields);



            var result = _serviceBL.AddServiceComponentValues(ref objOperationResult,
                                                              _serviceComponentFieldsList,
                                                              ((ClientSession)Session["objClientSession"]).GetAsList(),
                                                              Session["IdTrabajador"].ToString(),
                                                              Session["ServiceComponentId"].ToString());


            Alert.ShowInTop("Datos grabados correctamente.");
        }
Esempio n. 40
0
        protected override void billSave()
        {
            #region 数据有效性验证
            if ((",M,R,N").IndexOf(docFLAG.SelectedValue) < 0)
            {
                Alert.Show("非新单不能保存!", "消息提示", MessageBoxIcon.Warning);
                return;
            }
            List <Dictionary <string, object> > newDict = GridGoods.GetNewAddedList();
            if (newDict.Count == 0)
            {
                Alert.Show("请输入商品信息", "消息提示", MessageBoxIcon.Warning);
                return;
            }
            if (PubFunc.FormDataCheck(FormDoc).Length > 0)
            {
                return;
            }
            List <Dictionary <string, object> > goodsData = new List <Dictionary <string, object> >();
            //判断是否有空行、批号填写是否符合要求
            for (int i = 0; i < newDict.Count; i++)
            {
                if (!string.IsNullOrWhiteSpace(newDict[i]["GDSEQ"].ToString()) && !string.IsNullOrWhiteSpace(newDict[i]["GDNAME"].ToString()))
                {
                    if ((newDict[i]["BZSL"] ?? "").ToString() == "" || (newDict[i]["BZSL"] ?? "").ToString() == "0")
                    {
                        Alert.Show("请填写商品[" + newDict[i]["GDSEQ"] + "]出库数!", "消息提示", MessageBoxIcon.Warning);
                        return;
                    }
                    if (string.IsNullOrWhiteSpace(newDict[i]["BZHL"].ToString()) || string.IsNullOrWhiteSpace(newDict[i]["UNIT"].ToString()))
                    {
                        Alert.Show("商品[" + newDict[i]["GDSEQ"] + "]包装单位信息错误,请联系管理员维护!", "消息提示", MessageBoxIcon.Warning);
                        return;
                    }
                    if (string.IsNullOrWhiteSpace(newDict[i]["HSJJ"].ToString()))
                    {
                        Alert.Show("商品【" + newDict[i]["GDNAME"].ToString() + "】含税进价不能为空!!!", "消息提示", MessageBoxIcon.Warning);
                        return;
                    }
                    if (string.IsNullOrWhiteSpace(newDict[i]["UNIT"].ToString()))
                    {
                        Alert.Show("商品【" + newDict[i]["GDNAME"].ToString() + "】出库包装未维护!!!", "消息提示", MessageBoxIcon.Warning);
                        return;
                    }
                    goodsData.Add(newDict[i]);
                }
            }

            if (goodsData.Count == 0)//所有Gird行都为空行时
            {
                Alert.Show("商品信息不能为空", "消息提示", MessageBoxIcon.Warning);
                return;
            }
            #endregion

            if (PubFunc.StrIsEmpty(docBILLNO.Text))
            {
                docSEQNO.Text     = BillSeqGet();
                docBILLNO.Text    = docSEQNO.Text;
                docBILLNO.Enabled = false;
            }
            else
            {
                string flg = (string)DbHelperOra.GetSingle(string.Format("SELECT NVL(FLAG,'N') FROM DAT_DB_DOC WHERE SEQNO='{0}'", docBILLNO.Text));
                if (!string.IsNullOrWhiteSpace(flg) && (",M,N,R").IndexOf(flg) < 0)
                {
                    Alert.Show("您输入的单据号存在重复信息,请重新输入或置空!", "消息提示", MessageBoxIcon.Warning);
                    return;
                }
                else
                {
                    docSEQNO.Text     = docBILLNO.Text;
                    docBILLNO.Enabled = false;
                }
            }
            MyTable mtType = new MyTable("DAT_DB_DOC");
            mtType.ColRow          = PubFunc.FormDataHT(FormDoc);
            mtType.ColRow["SEQNO"] = docBILLNO.Text;
            mtType.ColRow.Add("BILLTYPE", BillType);
            mtType.ColRow.Add("SUBNUM", goodsData.Count);

            mtType.ColRow.Add("XSTYPE", "1");
            List <CommandInfo> cmdList  = new List <CommandInfo>();
            MyTable            mtTypeMx = new MyTable("DAT_DB_COM");
            decimal            subNum   = 0;//总金额
            string             onecode  = string.Empty;
            //先删除单据信息在插入
            cmdList.Add(new CommandInfo("delete DAT_DB_DOC where seqno='" + docBILLNO.Text + "' and flag = 'N'", null)); //删除单据台头
            cmdList.Add(new CommandInfo("delete DAT_DB_COM where seqno='" + docBILLNO.Text + "'", null));                //删除单据明细
            for (int i = 0; i < goodsData.Count; i++)
            {
                mtTypeMx.ColRow = PubFunc.GridDataGet(goodsData[i]);

                //判断含税进价,为0时不能保存
                if (PubFunc.StrIsEmpty(mtTypeMx.ColRow["HSJJ"].ToString()) || mtTypeMx.ColRow["HSJJ"].ToString() == "0")
                {
                    Alert.Show("商品【含税进价】为0或空,无法进行【库房出库管理】操作。");
                    return;
                }

                mtTypeMx.ColRow.Add("SEQNO", docBILLNO.Text);
                mtTypeMx.ColRow.Add("PHID", mtTypeMx.ColRow["PH"]);
                mtTypeMx.ColRow["DHSL"]  = decimal.Parse(mtTypeMx.ColRow["BZHL"].ToString()) * decimal.Parse(mtTypeMx.ColRow["BZSL"].ToString());
                mtTypeMx.ColRow["HSJE"]  = decimal.Parse(mtTypeMx.ColRow["HSJJ"].ToString()) * decimal.Parse(mtTypeMx.ColRow["BZSL"].ToString());
                mtTypeMx.ColRow["ROWNO"] = i + 1;
                subNum = subNum + decimal.Parse(mtTypeMx.ColRow["HSJE"].ToString());
                mtTypeMx.ColRow.Add("XSSL", mtTypeMx.ColRow["DHSL"].ToString());
                mtTypeMx.ColRow.Add("BHSJJ", 0);
                mtTypeMx.ColRow.Add("BHSJE", 0);
                onecode += mtTypeMx.ColRow["STR2"].ToString() + ",";
                mtTypeMx.ColRow.Remove("UNITNAME");
                mtTypeMx.ColRow.Remove("PRODUCERNAME");
                cmdList.Add(mtTypeMx.Insert());
            }
            mtType.ColRow.Add("SUBSUM", subNum);
            //object objCount = DbHelperOra.GetSingle(@"SELECT LISTAGG(ONECODE,',') WITHIN GROUP( ORDER BY ONECODE)
            //                                                                      FROM DAT_CK_EXT WHERE BILLNO <> '" + docBILLNO.Text + @"'
            //                                                                       AND ONECODE IN ('" + onecode.Trim(',').Replace(",", "','") + "')");
            //if (objCount != null && objCount.ToString().Length > 0)
            //{
            //    Alert.Show("高值码【" + objCount.ToString() + "】重复!!!", "异常提醒", MessageBoxIcon.Warning);
            //    return;
            //}
            // 写入追溯码表
            cmdList.Add(new CommandInfo("DELETE FROM DAT_DB_EXT WHERE BILLNO='" + docBILLNO.Text + "'", null));//删除单据明细
            cmdList.Add(new CommandInfo(String.Format(@"INSERT INTO DAT_DB_EXT(DEPTID,BILLNO,ROWNO,ONECODE,GDSEQ,GDNAME,BARCODE,UNIT,GDSPEC,DEPTCUR,BZHL,FLAG,PH,RQ_SC,YXQZ)
                        SELECT '{1}','{0}',ROWNUM,A.ONECODE,A.GDSEQ,A.GDNAME,A.BARCODE,A.UNIT,A.GDSPEC,A.DEPTCUR,A.BZHL,A.FLAG,A.PH,A.RQ_SC,A.YXQZ
                          FROM DAT_RK_EXT A,DAT_DB_COM B
                         WHERE A.GDSEQ = B.GDSEQ AND B.SEQNO = '{0}' AND (A.ONECODE = B.STR2 OR A.STR1 = B.STR2)", docBILLNO.Text, docDEPTID.SelectedValue), null));
            cmdList.Add(mtType.Insert());
            if (DbHelperOra.ExecuteSqlTran(cmdList))
            {
                Alert.Show("商品出库信息保存成功!");
                billLockDoc(true);
                billOpen(docBILLNO.Text);
                hdfRowIndex.Text = "";
            }
        }
Esempio n. 41
0
        /// <summary>
        /// 生成隐患整改单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnMenuRectify_Click(object sender, EventArgs e)
        {
            if (Grid1.SelectedRowIndexArray.Length == 0)
            {
                Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
                return;
            }
            string rectifyNoticeCode = string.Empty;
            string CheckDayId        = Grid1.SelectedRowID.Split(',')[0];
            var    checkDay          = BLL.Check_CheckDayService.GetCheckDayByCheckDayId(CheckDayId);

            if (checkDay.States == BLL.Const.State_2)
            {
                string CheckDayDetailId           = Grid1.SelectedRowID.Split(',')[1];
                Model.Check_CheckDayDetail detail = BLL.Check_CheckDayDetailService.GetCheckDayDetailByCheckDayDetailId(CheckDayDetailId);
                if (string.IsNullOrEmpty(detail.RectifyNoticeId))
                {
                    if (!string.IsNullOrEmpty(detail.UnitId))
                    {
                        Model.Check_RectifyNotices rectifyNotice = new Model.Check_RectifyNotices
                        {
                            RectifyNoticesId   = SQLHelper.GetNewID(typeof(Model.Check_RectifyNotice)),
                            ProjectId          = checkDay.ProjectId,
                            UnitId             = detail.UnitId,
                            CheckedDate        = checkDay.CheckTime,
                            RectifyNoticesCode = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.ProjectRectifyNoticeMenuId, checkDay.ProjectId, detail.UnitId),
                            WrongContent       = "开展了日常巡检,发现问题及隐患:" + detail.Unqualified + "\n" + detail.Suggestions,
                            SignPerson         = this.CurrUser.UserId,
                            SignDate           = DateTime.Now,
                        };

                        var workArea = Funs.DB.ProjectData_WorkArea.FirstOrDefault(x => x.ProjectId == checkDay.ProjectId && x.WorkAreaName == detail.WorkArea);
                        if (workArea != null)
                        {
                            rectifyNotice.WorkAreaId = workArea.WorkAreaId;
                        }

                        BLL.RectifyNoticesService.AddRectifyNotices(rectifyNotice);

                        rectifyNoticeCode      = rectifyNotice.RectifyNoticesCode;
                        detail.RectifyNoticeId = rectifyNotice.RectifyNoticesId;
                        BLL.Check_CheckDayDetailService.UpdateCheckDayDetail(detail);
                        ///写入工程师日志
                        BLL.HSSELogService.CollectHSSELog(rectifyNotice.ProjectId, rectifyNotice.SignPerson, rectifyNotice.SignDate, "22", rectifyNotice.WrongContent, Const.BtnAdd, 1);
                        if (!string.IsNullOrEmpty(rectifyNoticeCode))
                        {
                            Alert.ShowInTop("已生成隐患整改通知单:" + rectifyNoticeCode + "!", MessageBoxIcon.Success);
                            return;
                        }
                    }
                    else
                    {
                        Alert.ShowInTop("单位不能为空!", MessageBoxIcon.Warning);
                        return;
                    }
                }
                else
                {
                    Alert.ShowInTop("隐患整改通知单已存在,请到对应模块进行处理!", MessageBoxIcon.Warning);
                    return;
                }
            }
            else
            {
                Alert.ShowInTop("该记录尚未审批完成,无法进行操作!", MessageBoxIcon.Warning);
                return;
            }
        }
Esempio n. 42
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            // 在操作之前进行权限检查

            int roleId = GetSelectedDataKeyID(Grid1);

            if (roleId == -1)
            {
                return;
            }

            FineUIPro.TreeNode[] nodes       = TreeModule.GetCheckedNodes();
            List <int>           newPowerIDs = new List <int>();

            if (nodes.Length > 0)
            {
                foreach (FineUIPro.TreeNode node in nodes)
                {
                    if (node.Checked)
                    {
                        newPowerIDs.Add(Change.ToInt(node.NodeID));
                    }
                }
            }
            else
            {
                Alert.ShowInTop("没有选择数据!");
                return;
            }

            // 当前角色新的权限列表
            PermissionRole role = DB.PermissionRoles.Include("ModulePermissionRoles").Where(r => r.ID == roleId).FirstOrDefault();

            int[] newEntityIDs = newPowerIDs.ToArray();
            ICollection <ModulePermissionRole> existEntities = role.ModulePermissionRoles;

            int[] tobeAdded   = newEntityIDs.Except(existEntities.Select(x => x.ModuleID)).ToArray();
            int[] tobeRemoved = existEntities.Select(x => x.ModuleID).Except(newEntityIDs).ToArray();
            GenericRepository <ModulePermissionRole> moduleRoleRepository = UnitOfWork.Repository <ModulePermissionRole>();
            int companyID = UserInfo.Current.CompanyID;

            foreach (int id in tobeAdded)
            {
                ModulePermissionRole newEntity = new ModulePermissionRole()
                {
                    ModuleID         = id,
                    CompanyID        = companyID,
                    PermissionRoleID = roleId,
                    CreateDatetime   = DateTime.Now
                };
                moduleRoleRepository.Insert(newEntity, out msg, false);
                //role.ModulePermissionRoles.Add(newEntity);
            }

            foreach (int id in tobeRemoved)
            {
                //role.ModulePermissionRoles.Remove(existEntities.Single(r => r.ModuleID == id && r.PermissionRoleID == roleId));
                moduleRoleRepository.Delete(existEntities.Single(r => r.ModuleID == id && r.PermissionRoleID == roleId), out msg, false);
            }

            if (!UnitOfWork.Save(out msg))
            {
                Alert.ShowInTop("当前角色的权限更新成功!", MessageBoxIcon.Error);
                //DB.SaveChanges();
            }
            else
            {
                Alert.ShowInTop("当前角色的权限更新成功!");
            }
        }
Esempio n. 43
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Dictionary <string, string> dicOutBuykit = initDatadicOutBuykit();
            Dictionary <string, string> dicPhoto     = initDatadicPhoto();
            string       strID           = editID.Text.ToString().Trim();
            pd_outbuykit ok              = new pd_outbuykit();
            pd_photo     ph              = new pd_photo();
            int          intresultRecord = 0;
            int          intresultPhoto  = 0;

            if (strID == "")
            {
                string standardKitID = Guid.NewGuid().ToString();
                dicOutBuykit.Add("ID", standardKitID);
                dicOutBuykit.Add("isdelid", "1");
                dicPhoto.Add("ID", Guid.NewGuid().ToString());
                dicPhoto.Add("isdelid", "1");
                dicPhoto.Add("pid", standardKitID);
                string str_ocode = dicOutBuykit["ocode"].ToString().Trim();
                string str_oname = dicOutBuykit["oname"].ToString().Trim();
                if ((ok.isExistdata("pd_outbuykit", "ocode", str_ocode, "ocode").Trim() != "") || (ok.isExistdata("pd_outbuykit", "oname", str_oname, "oname").Trim() != ""))
                {
                    Alert.Show(" 该外购件名称或代码已经存在!");
                }
                else
                {
                    intresultRecord = ok.add(dicOutBuykit, "pd_outbuykit");
                    intresultPhoto  = 1;
                    if ((filePhoto.HasFile) && (intresultRecord == 1))
                    {
                        intresultPhoto = ph.add(dicPhoto, "pd_photo");
                    }
                }
            }
            else
            {
                intresultRecord = ok.update(dicOutBuykit, "pd_outbuykit", "ID", strID);
                //exist photo->update || else ->add
                string photoID = ok.getPhotoID(strID).Trim();
                if (intresultRecord == 1)
                {
                    if (photoID != "")

                    {
                        // 返回与指定虚拟路径相对应的物理路径即绝对路径
                        string filePath = Server.MapPath(IMAGEPATH + ok.getPhotoFileName(strID));
                        // 删除该文件
                        System.IO.File.Delete(filePath);
                        intresultPhoto = ph.update(dicPhoto, "pd_photo", "ID", photoID);
                    }
                    else
                    {
                        dicPhoto.Add("ID", Guid.NewGuid().ToString());
                        dicPhoto.Add("isdelid", "1");
                        dicPhoto.Add("pid", strID);
                        intresultPhoto = ph.add(dicPhoto, "pd_photo");
                    }
                }
            }

            if (CurPage.Text.Trim() == "")
            {
                setPageContent(1);
            }
            else
            {
                setPageContent(5);
            }

            Alert alert = new Alert();

            if ((intresultRecord == 1) && (intresultPhoto == 1))
            {
                alert.Icon    = Icon.Information;
                alert.Message = "数据保存成功";
                imgPhoto.Reset();
                filePhoto.Reset();
            }
            else if (intresultRecord == 0)
            {
                alert.MessageBoxIcon = MessageBoxIcon.Error;
                alert.Message        = "数据保存失败";
                filePhoto.Reset();
                imgPhoto.Reset();
            }
            else if (intresultPhoto == 0)
            {
                alert.MessageBoxIcon = MessageBoxIcon.Error;
                alert.Message        = "图片保存失败";
                filePhoto.Reset();
                imgPhoto.Reset();
            }


            alert.Show();
        }
Esempio n. 44
0
        void RenderReceipt()
        {
            var  store    = Sale.Store;
            var  customer = Sale.Customer;
            bool hasNote  = !string.IsNullOrEmpty(Sale.Note) && !string.IsNullOrWhiteSpace(Sale.Note);

            PageSettings pageSettings = new PageSettings();

            pageSettings.Margins.Top    = 0;
            pageSettings.Margins.Bottom = 0;
            pageSettings.Margins.Left   = 0;
            pageSettings.Margins.Right  = 0;

            double defaultHeight = 198;  //mm  + 2 - 2 mm

            defaultHeight -= !hasNote ? 5 : 0;

            foreach (Backend.Objects.SaleItemReceipt item in Sale.ItemsReceipt)
            {
                // Add Item height depending on length each 11 char makes a line
                defaultHeight += item.Name.Length / 11 * ((item.Name.Length > 11) ? 15 : 10);
            }

            // height -> hundreth inch
            int height = (int)Math.Round(defaultHeight * (0.03937) * 100, 1);

            pageSettings.PaperSize = new PaperSize("Custom", 190, height);

            DataTable dtItems = DataUtil.ToDataTable(Sale.ItemsReceipt);
            DataSet   dsItems = new DataSet();

            dsItems.Tables.Add(dtItems);
            ReportDataSource reportDataSource = new ReportDataSource
            {
                Name  = "Item",
                Value = dsItems.Tables[0]
            };

            this.receiptPreview.LocalReport.DataSources.Add(reportDataSource);

            var postCodeCity    = string.Format("{0} {1}", store.PostCode, store.City);
            var firstName       = Sale.User.FirstName.FirstOrDefault().ToString().ToUpper();
            var userDisplayName = string.Format("{0}. {1}", firstName, Sale.User.LastName);
            var message         = Properties.Settings.Default.ReceiptFooterMessage;

            string customerText = null;

            if (customer is object)
            {
                customerText = !string.IsNullOrEmpty(customer.Id) ? $"KUNDE : {customer.FirstName } {customer.LastName } " : "";
            }

            var note = (!string.IsNullOrEmpty(Sale.Note) && !string.IsNullOrWhiteSpace(Sale.Note)) ? $"MERKE : {Sale.Note } " : "";

            // GetTaxRates
            var taxA = $"A { GetTaxRate(taxCode: "A")} %";
            var taxB = $"B {GetTaxRate(taxCode: "B")} %";

            ReportParameter[] parameters = new ReportParameter[]
            {
                // Header
                new ReportParameter("StoreName", store.Name),
                new ReportParameter("Address", store.Address),
                new ReportParameter("PostCodeCity", postCodeCity),
                new ReportParameter("PhoneNumber", store.PhoneNumber),

                new ReportParameter("SaleId", Sale.Id),
                new ReportParameter("DateTime", DateTime.Now.ToString()),

                // Amounts
                new ReportParameter("TotalAmount", StringUtil.ToRoundedString(Sale.TotalPrice)),
                new ReportParameter("PaymentMethod", ToPaymentMethodString),
                new ReportParameter("PaidAmount", StringUtil.ToRoundedString(Sale.Paid)),
                new ReportParameter("BalanceAmount", StringUtil.ToRoundedString(Sale.Balance)),
                new ReportParameter("ItemsCount", Sale.ItemsCount.ToString()),

                // Tax
                new ReportParameter("TaxID", store.TaxID),
                new ReportParameter("TaxA", taxA),
                new ReportParameter("TaxB", taxB),

                new ReportParameter("TaxARevenue", StringUtil.ToRoundedString(Sale.TaxARevenue)),
                new ReportParameter("TaxBRevenue", StringUtil.ToRoundedString(Sale.TaxBRevenue)),
                new ReportParameter("TaxAAmount", StringUtil.ToRoundedString(Sale.TaxAAmount)),
                new ReportParameter("TaxBAmount", StringUtil.ToRoundedString(Sale.TaxBAmount)),
                new ReportParameter("TaxANetto", StringUtil.ToRoundedString(Sale.TaxANetPrice)),
                new ReportParameter("TaxBNetto", StringUtil.ToRoundedString(Sale.TaxBNetPrice)),
                new ReportParameter("Revenue", StringUtil.ToRoundedString(Sale.TaxRevenue)),
                new ReportParameter("TaxAmount", StringUtil.ToRoundedString(Sale.TaxAmount)),
                new ReportParameter("NettoAmount", StringUtil.ToRoundedString(Sale.TaxNetPrice)),


                // ...
                new ReportParameter("Currency", store.CurrencySign),
                new ReportParameter("UserDisplayName", userDisplayName),
                new ReportParameter("Message", message),
                new ReportParameter("Customer", customerText),
                new ReportParameter("Note", note),
            };
            try
            {
                this.receiptPreview.SetPageSettings(pageSettings);
                this.receiptPreview.LocalReport.SetParameters(parameters);
                this.receiptPreview.RefreshReport();
            }
            catch
            {
                Alert.Show("Error Printing", "A Fatal Error occured while refreshing Receipt", Alert.AlertType.Error, isMini: false);
            }
        }
Esempio n. 45
0
 private static Alert FindUpdate(Alert alert)
 {
     lock (updateAlertsLock)
         return(FindUpdate(a => a.Equals(alert)));
 }
Esempio n. 46
0
    //Function launches corresponding actions based on activated widget
    void UnifiedActionControl(Storage storedwidget, string widgetname)
    {
        switch (widgetname)
        {
        //Convert to DAISY format
        case "daisy":
            ExportClass.Extract(this, lat);
            break;

        //Delete current audiotrack
        case "delete_file":
            if (Audio_GUI_Index > 0)
            {
                int index = Audio_GUI_Index - 1;
                lat.RemoveAt(index);
                if (index >= lat.Count)
                {
                    Audio_GUI_Index--;
                }
                Refresh_Audio_Widgets();
                Stamp_GUI_Index = -1;
                Refresh_Timestamp_Widgets();
            }
            break;

        //Delete the whole project from memory
        case "create":
            StopPlay();
            Audio_GUI_Index = -1;
            Stamp_GUI_Index = -1;
            lat.Clear();
            Refresh_Audio_Widgets();
            Refresh_Timestamp_Widgets();
            MainTitle.Text = "[*No project*]";
            break;

        //Move track to the previous position, if available
        case "skip_previous":
            if (Audio_GUI_Index > 0)
            {
                int index = Audio_GUI_Index - 1;
                if (index > 0)
                {
                    var lost_element = lat [index];
                    lat.RemoveAt(index);
                    lat.Insert(index - 1, lost_element);
                    Audio_GUI_Index--;
                    Refresh_Audio_Widgets(Audio_GUI_Index, true);
                }
            }
            break;

        //Move track to the next position, if available
        case "skip1":
            if (Audio_GUI_Index > 0)
            {
                int index = Audio_GUI_Index - 1;
                if (index < lat.Count - 1)
                {
                    var lost_element = lat [index];
                    lat.RemoveAt(index);
                    lat.Insert(index + 1, lost_element);
                    Audio_GUI_Index++;
                    Refresh_Audio_Widgets(Audio_GUI_Index, true);
                }
            }
            break;

        //Show Open Dialog
        case "open":
            Show_OpenDialog();
            break;

        //Show Save Dialog
        case "save":
            Show_SaveDialog();
            break;

        //Minimize window
        case "window_minimize":
            this.Iconify();
            break;

        //Close window
        case "window_close":
            OnDeleteEvent(this, null);
            break;

        //Mute sound
        case "sound":
            if (!storedwidget.current_state)
            {
                storedvol = MainClass.wmp.settings.volume;
                MainClass.wmp.settings.volume = 0;
            }
            else
            {
                MainClass.wmp.settings.volume = storedvol;
                storedvol = -1;
            }
            break;

        //About window
        case "info":
            Alert.Show(this, "About", true);
            break;

        //Play or pause
        case "play":
            if (Audio_GUI_Index > 0)
            {
                if (!storedwidget.current_state)
                {
                    MainClass.wmp.Ctlcontrols.play();
                }
                else
                {
                    MainClass.wmp.Ctlcontrols.pause();
                }
            }
            break;

        //Stop playing
        case "stop":
            MainClass.wmp.Ctlcontrols.stop();
            //Find "play" button and force default state
            var otherstoredwidget = ControlStorage.Find(y => y.widget.Name == "play");
            otherstoredwidget.current_state          = true;
            ((Image)otherstoredwidget.widget).Pixbuf = Gdk.Pixbuf.LoadFromResource("DAISYGen.Buttons.play_on_usual.png");
            break;

        //Add new timestamp for the selected audiotrack
        case "new":
            if (Audio_GUI_Index > 0)
            {
                AddDaisyTime(lat [Audio_GUI_Index - 1].Timestamps);
                Refresh_Timestamp_Widgets();
            }
            break;

        //Move selected timestamp higher up the hierarchy
        case "up":
            if (Audio_GUI_Index > 0 && Stamp_GUI_Index > 0)
            {
                ChangeHierarchyLevel(lat [Audio_GUI_Index - 1].Timestamps, Stamp_GUI_Index, -1);
                Refresh_Timestamp_Widgets();
            }
            break;

        //Move selected timestamp lower down the hierarchy
        case "down":
            if (Audio_GUI_Index > 0 && Stamp_GUI_Index > 0)
            {
                if (lat [Audio_GUI_Index - 1].Timestamps [Stamp_GUI_Index].position < lat [Audio_GUI_Index - 1].Timestamps [Stamp_GUI_Index - 1].position + 1)
                {
                    ChangeHierarchyLevel(lat [Audio_GUI_Index - 1].Timestamps, Stamp_GUI_Index, 1);
                }
                Refresh_Timestamp_Widgets();
            }
            break;

        //Erase timestamp
        case "delete":
            if (Audio_GUI_Index > 0 && Stamp_GUI_Index > 0)
            {
                EraseStamp(lat [Audio_GUI_Index - 1].Timestamps, Stamp_GUI_Index);
                Refresh_Timestamp_Widgets();
            }
            break;

        //Switch activation mode
        case "activation":
            ActivationAsSearch = storedwidget.current_state;
            break;

        //Change current timestamp title
        case "write":
            if (Audio_GUI_Index > 0 && Stamp_GUI_Index > -1)
            {
                lat [Audio_GUI_Index - 1].Timestamps [Stamp_GUI_Index].title = textbox.Text;
                Refresh_Timestamp_Widgets();
            }
            break;
        }
    }
Esempio n. 47
0
        /// <summary>
        /// Dismisses the updates in the given list i.e. they are added in the
        /// other_config list of each pool and removed from the Updates.UpdateAlerts list.
        /// </summary>
        /// <param name="toBeDismissed"></param>
        public static void DismissUpdates(List <Alert> toBeDismissed)
        {
            if (toBeDismissed.Count == 0)
            {
                return;
            }

            foreach (IXenConnection connection in ConnectionsManager.XenConnectionsCopy)
            {
                if (!Alert.AllowedToDismiss(connection))
                {
                    continue;
                }

                XenAPI.Pool pool = Helpers.GetPoolOfOne(connection);
                if (pool == null)
                {
                    continue;
                }

                Dictionary <string, string> other_config = pool.other_config;

                foreach (Alert alert in toBeDismissed)
                {
                    if (alert is XenServerPatchAlert)
                    {
                        if (other_config.ContainsKey(IgnorePatchAction.IgnorePatchKey))
                        {
                            List <string> current = new List <string>(other_config[IgnorePatchAction.IgnorePatchKey].Split(','));
                            if (current.Contains(((XenServerPatchAlert)alert).Patch.Uuid, StringComparer.OrdinalIgnoreCase))
                            {
                                continue;
                            }
                            current.Add(((XenServerPatchAlert)alert).Patch.Uuid);
                            other_config[IgnorePatchAction.IgnorePatchKey] = string.Join(",", current.ToArray());
                        }
                        else
                        {
                            other_config.Add(IgnorePatchAction.IgnorePatchKey, ((XenServerPatchAlert)alert).Patch.Uuid);
                        }
                    }
                    if (alert is XenServerVersionAlert)
                    {
                        if (other_config.ContainsKey(IgnoreServerAction.LAST_SEEN_SERVER_VERSION_KEY))
                        {
                            List <string> current = new List <string>(other_config[IgnoreServerAction.LAST_SEEN_SERVER_VERSION_KEY].Split(','));
                            if (current.Contains(((XenServerVersionAlert)alert).Version.VersionAndOEM))
                            {
                                continue;
                            }
                            current.Add(((XenServerVersionAlert)alert).Version.VersionAndOEM);
                            other_config[IgnoreServerAction.LAST_SEEN_SERVER_VERSION_KEY] = string.Join(",", current.ToArray());
                        }
                        else
                        {
                            other_config.Add(IgnoreServerAction.LAST_SEEN_SERVER_VERSION_KEY, ((XenServerVersionAlert)alert).Version.VersionAndOEM);
                        }
                    }
                    Updates.RemoveUpdate(alert);
                }

                XenAPI.Pool.set_other_config(connection.Session, pool.opaque_ref, other_config);
            }
        }
Esempio n. 48
0
 public Task Save(Alert alert)
 {
     return(_aggregateStorage.SaveEventsAsync(alert, _alert_entity, alert.State.UserId));
 }
Esempio n. 49
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     data.RunSql("insert into FenLei(name)values('" + TextBox1.Text + "')");
     Alert.AlertAndRedirect("添加成功", "FenLeiManger.aspx");
 }
Esempio n. 50
0
        private void CheckBtnAddNew()
        {
            bool canAdd = BLL.Xmgl.Xm_sxhb.CanAdd(TStar.Web.Globals.Account.Pkid);

            btnAddNew.OnClientClick = (canAdd ? wndEdit.GetShowReference("SxhbEdit.aspx", "弹出窗-新撰写") : Alert.GetShowReference("请先提交之前撰写的思想汇报 !")) + "return false;";
        }
 public static Alert WithMessage(this Alert alert, String message)
 {
     alert.Message = message;
     return(alert);
 }
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            // 1. 这里放置保存窗体中数据的逻辑

            int messageID                 = int.Parse(Request.QueryString["id"].Trim());
            List <T_Message> message      = messageBLL.GetMessageById(messageID);
            T_Message        messageModel = new T_Message();

            try
            {
                #region 邮件信息

                MailMessage mail = new MailMessage();
                mail.To.Add(new MailAddress(message[0].Email));
                mail.From = new MailAddress(txb_ReplyEmailAddress.Text.Trim(), "武汉理工大学心理健康平台", System.Text.Encoding.UTF8);
                string _body    = "";
                string _subject = "回复:" + txa_BriefQuestion.Text.Trim();
                _body = HtmlEditor1.Text + "<br/><br/>******************************************************" + "<br/>" +
                        "这是一封系统自动发送的邮件通知,请不要直接回复,如有疑问,请联系管理员。" + "<br/>" +
                        "<br/>请添加本邮箱为联系人,以便于即时收到邮件通知。祝 学习生活愉快!";
                mail.Body       = _body;
                mail.Subject    = _subject;
                mail.Priority   = MailPriority.High;
                mail.IsBodyHtml = true;
                //mail.BodyEncoding = System.Text.Encoding.UTF8;

                #endregion

                #region 发送方服务器信息

                SmtpClient smtp = new SmtpClient();
                if (txb_ReplyEmailAddress.Text.Trim().IndexOf("@126.com") >= 0)
                {
                    smtp.Host = "smtp.126.com";
                }
                //smtp.UseDefaultCredentials = true;
                //smtp.EnableSsl = true;
                string mailFromAddress = txb_ReplyEmailAddress.Text.Split(new char[] { '@' })[0];

                smtp.Credentials    = new System.Net.NetworkCredential("*****@*****.**", txb_ReplyEmailPwd.Text.Trim());
                smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
                smtp.Port           = 25;
                //smtp.Send(mail);  //同步发送程序将被阻塞

                #endregion



                #region 异步发送邮件 判断发送状态

                smtp.SendCompleted += new SendCompletedEventHandler(SendCompletedCallBack);
                string userState = "测试";
                smtp.SendAsync(mail, userState);

                #endregion
            }
            catch
            {
                throw;
            }

            #region 保存至数据库

            messageModel.ID             = messageID;
            messageModel.NickName       = message[0].NickName;
            messageModel.Sex            = message[0].Sex;
            messageModel.Email          = message[0].Email;
            messageModel.Grade          = message[0].Grade;
            messageModel.TeacherName    = message[0].TeacherName;
            messageModel.BriefQuestion  = txa_BriefQuestion.Text.Trim();
            messageModel.DetailQuestion = txa_DetailQuestion.Text.Trim();
            messageModel.QuestionTime   = message[0].QuestionTime;
            messageModel.Reply          = HtmlEditor1.Text.Trim();
            messageModel.ReplyTime      = DateTime.Now;
            messageModel.Category       = 0;
            if (HtmlEditor1.Text.Trim() != "")
            {
                messageModel.Status = 1;
            }

            int result = messageBLL.Update(messageModel);

            if (result > 0)
            {
                Alert alert = new Alert();
                alert.Message = "回复成功";
                alert.Target  = Target.Top;
                alert.Show();
            }
            else
            {
                Alert alert = new Alert();
                alert.Message = "出现错误 请稍后再试";
                alert.Target  = Target.Top;
                alert.Show();
            }

            #endregion



            // 2. 关闭本窗体,然后刷新父窗体
            PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
        }
 static public bool Update(Alert alert, out string msg)
 {
     return(AlertDAL.Update(alert, out msg));
 }
 static public bool Add(Alert alert, out string msg)
 {
     return(AlertDAL.Add(alert, out msg));
 }
Esempio n. 55
0
 protected void Grid1_RowSelect(object sender, GridRowSelectEventArgs e)
 {
     Alert.ShowInTop(String.Format("你选中了第 {0} 行,行ID:{1}", e.RowIndex + 1, e.RowID));
 }
 public MyNotificationController(IntPtr handle) : base(handle)
 {
     alertServices = new Alert();
 }
 public static Alert WithTriggerTable(this Alert alert, String triggerTable)
 {
     alert.TriggerTable = triggerTable;
     return(alert);
 }
Esempio n. 58
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            if (dpkTime1.SelectedDate == null || dpkTime2.SelectedDate == null)
            {
                Alert.Show("请输入条件【查询期间】!");
                return;
            }
            else if (dpkTime1.SelectedDate > dpkTime2.SelectedDate)
            {
                Alert.Show("开始日期大于结束日期,请重新输入!");
                return;
            }
            String sql    = @"SELECT A.DEPTID,f_getdeptname(A.DEPTID) DEPTNAME,B.GDSEQ,B.GDNAME,B.GDSPEC,f_getunitname(B.UNIT) UNITNAME,B.HSJJ,f_getproducername(B.PRODUCER) PRODUCERNAME,
                           SUM(DECODE(A.KCADD,'1',DECODE(A.BILLTYPE,'XST',0,A.SL),0)) RKSL,SUM(DECODE(A.KCADD,'1',DECODE(A.BILLTYPE,'XST',0,A.HSJE),0)) RKJE,
                           SUM(DECODE(A.KCADD,'-1',DECODE(A.BILLTYPE,'XST',0,'LTD',0,'DST',0,'THD',0,A.SL),0)) CKSL,SUM(DECODE(A.KCADD,'-1',DECODE(A.BILLTYPE,'XST',0,'LTD',0,'DST',0,'THD',0,A.HSJE),0)) CKJE,
                           SUM(DECODE(A.KCADD,'-1',DECODE(A.BILLTYPE,'XST',A.SL,'LTD',A.SL,'DST',A.SL,'THD',A.SL,0),0)) THSL,SUM(DECODE(A.KCADD,'-1',DECODE(A.BILLTYPE,'XST',A.HSJE,'LTD',A.HSJE,'DST',A.HSJE,'THD',A.HSJE,0),0)) THJE,
                           NVL((SELECT SUM(KCSL) FROM DAT_GOODSSTOCK WHERE DEPTID = A.DEPTID AND GDSEQ = B.GDSEQ),0) KCSL,
                           NVL((SELECT SUM(KCSL) FROM DAT_GOODSSTOCK WHERE DEPTID = A.DEPTID AND GDSEQ = B.GDSEQ),0)*B.HSJJ KCJE
                    FROM DAT_GOODSJXC A,DOC_GOODS B
                    WHERE A.RQSJ BETWEEN TO_DATE('{0}','YYYY-MM-DD') AND TO_DATE('{1}','YYYY-MM-DD') + 1
                    AND A.GDSEQ = B.GDSEQ AND F_CHK_DATARANGE(A.DEPTID, '{2}') = 'Y'";
            String search = @" ";

            if (tbxGDSEQ.Text.Trim().Length > 0)
            {
                search += String.Format(" AND (B.GDSEQ LIKE '%{0}%' OR B.GDNAME  LIKE '%{0}%' OR B.ZJM  LIKE '%{0}%' OR B.BAR3 LIKE '%{0}%')", tbxGDSEQ.Text.Trim());
            }
            if (schDEPTID.SelectedValue.Length > 0)
            {
                search += String.Format(" AND A.DEPTID = '{0}'", schDEPTID.SelectedValue);
            }
            if (isGZ.SelectedValue.Length > 0)
            {
                search += String.Format(" AND B.ISGZ = '{0}'", isGZ.SelectedValue);
            }
            string sortField     = gidGoods.SortField;
            string sortDirection = gidGoods.SortDirection;

            sql = String.Format(sql + search + " GROUP BY A.DEPTID,B.GDSEQ,B.GDNAME,B.GDSPEC,B.UNIT,B.HSJJ,B.PRODUCER" + String.Format(" ORDER BY {0} {1}", sortField, sortDirection), dpkTime1.Text, dpkTime2.Text, UserAction.UserID);
            int       total  = 0;
            DataTable dtData = PubFunc.DbGetPage(gidGoods.PageIndex, gidGoods.PageSize, sql, ref total);

            gidGoods.RecordCount = total;
            gidGoods.DataSource  = dtData;
            gidGoods.DataBind();

            Decimal RKSL = 0, RKJE = 0, CKSL = 0, CKJE = 0, THSL = 0, THJE = 0, KCSL = 0, KCJE = 0;

            foreach (DataRow row in dtData.Rows)
            {
                RKSL += Convert.ToDecimal(row["RKSL"]);
                RKJE += Convert.ToDecimal(row["RKJE"]);
                CKSL += Convert.ToDecimal(row["CKSL"]);
                CKJE += Convert.ToDecimal(row["CKJE"]);
                THSL += Convert.ToDecimal(row["THSL"]);
                THJE += Convert.ToDecimal(row["THJE"]);
                KCSL += Convert.ToDecimal(row["KCSL"]);
                KCJE += Convert.ToDecimal(row["KCJE"]);
            }
            JObject summary = new JObject();

            summary.Add("GDSPEC", "本页合计");
            summary.Add("RKSL", RKSL.ToString("F2"));
            summary.Add("RKJE", RKJE.ToString("F2"));
            summary.Add("CKSL", CKSL.ToString("F2"));
            summary.Add("CKJE", CKJE.ToString("F2"));
            summary.Add("THSL", THSL.ToString("F2"));
            summary.Add("THJE", THJE.ToString("F2"));
            summary.Add("KCSL", KCSL.ToString("F2"));
            summary.Add("KCJE", KCJE.ToString("F2"));
            gidGoods.SummaryData = summary;
        }
Esempio n. 59
0
        protected void btnEpt_Click(object sender, EventArgs e)
        {
            if (lstLRRQ1.SelectedDate == null || lstLRRQ2.SelectedDate == null)
            {
                Alert.Show("请输入条件【申领日期】!");
                return;
            }
            else if (lstLRRQ1.SelectedDate > lstLRRQ2.SelectedDate)
            {
                Alert.Show("开始日期大于结束日期,请重新输入!");
                return;
            }

            string strSql    = @"SELECT A.BILLNO 单据编号,
                                       F_GETDEPTNAME(A.DEPTID) 申领部门,
                                       A.XSRQ 申领日期,
                                       F_GETDEPTNAME(A.DEPTOUT) 出库部门,
                                       F_GETUSERNAME(A.SLR) 申领人,
                                       F_GETUSERNAME(A.LRY) 录入人,
                                       A.LRRQ 录入日期,
                                       B.ROWNO 行号,
                                       ''''||B.GDSEQ 商品编码,
                                       B.GDNAME 商品名称,
                                       B.GDSPEC 商品规格,
                                       B.PZWH 注册证号,
                                       F_GETUNITNAME(B.UNIT) 单位,
                                       F_GETPRODUCERNAME(B.PRODUCER) 生产厂家,
                                       B.STR2 高值条码,
                                       B.BZHL 包装含量,
                                       B.BZSL 申领包装数,
                                       B.XSSL 申领数,B.HSJJ 价格,B.PH 批号,B.RQ_SC 生产日期,B.YXQZ 有效期至
                                  FROM DAT_CK_DOC A, DAT_CK_COM B
                                 WHERE A.SEQNO=B.SEQNO
                                   AND A.BILLTYPE = '" + BillType + @"'
                                   AND A.XSTYPE = 'G' ";
            string strSearch = "";


            if (tgbBILLNO.Text.Length > 0)
            {
                strSearch += string.Format(" AND A.BILLNO  LIKE '%{0}%'", tgbBILLNO.Text);
            }
            if (lstFLAG.SelectedItem != null && lstFLAG.SelectedItem.Value.Length > 0)
            {
                strSearch += string.Format(" AND A.FLAG='{0}'", lstFLAG.SelectedItem.Value);
            }
            if (lstDEPTID.SelectedItem != null && lstDEPTID.SelectedItem.Value.Length > 0)
            {
                strSearch += string.Format(" AND A.DEPTID='{0}'", lstDEPTID.SelectedItem.Value);
            }
            if (ddlDEPTOUT.SelectedValue.Length > 0)
            {
                strSearch += string.Format(" AND A.DEPTOUT='{0}'", ddlDEPTOUT.SelectedItem.Value);
            }
            strSearch += string.Format(" AND A.deptid in( select code FROM SYS_DEPT where type <>'1' and  F_CHK_DATARANGE(CODE, '{0}') = 'Y' )", UserAction.UserID);
            strSearch += string.Format(" AND A.LRRQ>=TO_DATE('{0}','YYYY-MM-DD')", lstLRRQ1.Text);
            strSearch += string.Format(" AND A.LRRQ <TO_DATE('{0}','YYYY-MM-DD') + 1", lstLRRQ2.Text);

            if (!string.IsNullOrWhiteSpace(strSearch))
            {
                strSql += strSearch;
            }
            strSql += " ORDER BY A.BILLNO DESC,B.ROWNO";

            DataTable dt = DbHelperOra.Query(strSql).Tables[0];

            if (dt == null || dt.Rows.Count == 0)
            {
                Alert.Show("暂时没有符合要求的数据,无法导出", "消息提示", MessageBoxIcon.Warning);
                return;
            }
            XTBase.Utilities.ExcelHelper.ExportByWeb(dt, "科室出库信息", string.Format("科室申领信息_{0}.xls", DateTime.Now.ToString("yyyyMMdd")));
        }
 public static Alert WithTriggerOperator(this Alert alert, String triggerOperator)
 {
     alert.TriggerOperator = triggerOperator;
     return(alert);
 }