示例#1
0
        /// <summary>
        /// 摄控界面进入
        /// </summary>
        /// <param name="customerInfo"></param>
        public frmSendSms(List <string[]> customerInfo)
        {
            InitializeComponent();
            IsDtpUse(false);
            ClientSide.Sms.GetApp(Application.StartupPath);

            frmSexChoose fsc = new frmSexChoose();

            fsc.ShowDialog();

            foreach (string[] info in customerInfo)
            {
                if (fsc.sex == 0)
                {
                    if (info[2].Trim().Length != 0)
                    {
                        customerno.Add(info[0]);
                        txtPhone.Text += info[2] + ",";
                    }
                }
                else if (fsc.sex == 1)
                {
                    if (info[1].Trim().Length != 0)
                    {
                        customerno.Add(info[0]);
                        txtPhone.Text += info[1] + ",";
                    }
                }
                else
                {
                    if (info[2].Trim().Length != 0)
                    {
                        customerno.Add(info[0]);
                        txtPhone.Text += info[2] + ",";
                    }
                    if (info[1].Trim().Length != 0)
                    {
                        customerno.Add(info[0]);
                        txtPhone.Text += info[1] + ",";
                    }
                }
            }
            if (txtPhone.Text.Split(',').Length > 0)
            {
                txtPhone.Text = txtPhone.Text.Substring(0, txtPhone.Text.Length - 1);
            }
        }
示例#2
0
        List <string> customerno   = new List <string>();    //客户号

        private void SearchCustomers(List <string> sOrderNO) //根据传入的订单号查询顾客手机号
        {
            string sSql = "and (1<>1 ";

            for (int i = 0; i < sOrderNO.Count; i++)
            {
                sSql += "or OrderNO = '" + sOrderNO[i] + "' ";
            }
            sSql += ") ";
            DataSet myds = new DataSet();

            myds = ErpWs.SearchOrders(ErpWs._Columns_All, sSql);
            DataRow[]    dr    = myds.Tables[0].Select("1=1");
            int          count = dr.Length;
            frmSexChoose fsc   = new frmSexChoose();

            fsc.ShowDialog();
            if (fsc.sex == 2)
            {
                for (int i = 0; i < count; i++)
                {
                    if (dr[i]["MobilePhone1"].ToString().Trim().Length != 0)
                    {
                        txtPhone.Text += dr[i]["MobilePhone1"].ToString().Trim();
                        customername.Add(dr[i]["customername1"].ToString());
                        customerno.Add(dr[i]["customerno"].ToString());
                        if (i != (count - 1) || dr[i]["MobilePhone2"].ToString().Trim().Length != 0)
                        {
                            txtPhone.Text += ",";
                        }
                    }
                    if (dr[i]["MobilePhone2"].ToString().Trim().Length != 0)
                    {
                        txtPhone.Text += dr[i]["MobilePhone2"].ToString().Trim();
                        customername.Add(dr[i]["customername2"].ToString());
                        customerno.Add(dr[i]["customerno"].ToString());
                        if (i != (count - 1))
                        {
                            txtPhone.Text += ",";
                        }
                    }
                }
            }
            else if (fsc.sex == 0)
            {
                for (int i = 0; i < count; i++)
                {
                    if (dr[i]["MobilePhone2"].ToString().Trim().Length != 0)
                    {
                        txtPhone.Text += dr[i]["MobilePhone2"].ToString().Trim();
                        customername.Add(dr[i]["customername2"].ToString());
                        customerno.Add(dr[i]["customerno"].ToString());
                        if (i != (count - 1))
                        {
                            txtPhone.Text += ",";
                        }
                    }
                }
            }
            else if (fsc.sex == 1)
            {
                for (int i = 0; i < count; i++)
                {
                    if (dr[i]["MobilePhone1"].ToString().Trim().Length != 0)
                    {
                        txtPhone.Text += dr[i]["MobilePhone1"].ToString().Trim();
                        customername.Add(dr[i]["customername1"].ToString());
                        customerno.Add(dr[i]["customerno"].ToString());
                        if (i != (count - 1))
                        {
                            txtPhone.Text += ",";
                        }
                    }
                }
            }
        }