Esempio n. 1
0
        /// <summary>
        /// 车型下拉
        /// </summary>
        private void CarType()
        {
            MSourceMotorcade model = new BSource().GetMotorcadeModel(Utils.GetQueryStringValue("sourceId"));

            if (model != null && model.CarList != null && model.CarList.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("<option value=-1>-请选择-</option>");
                foreach (MSourceCar item in model.CarList)
                {
                    sb.Append("<option value=" + item.CarId + ">" + item.TypeName + "</option>");
                }
                PageResponse(sb.ToString());
            }
            PageResponse("<option value=-1>-无可选择车型-</option>");
        }
Esempio n. 2
0
        /// <summary>
        /// 支出下拉
        /// </summary>
        private void CarType()
        {
            var model = new BSource().GetSpotModel(Utils.GetQueryStringValue("sourceId"));

            if (model != null && model.PriceSystemList != null && model.PriceSystemList.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("<option value=-1>-请选择-</option>");
                foreach (var item in model.PriceSystemList)
                {
                    sb.Append("<option value=" + item.Id + ">" + item.SpotName + "</option>");
                }
                PageResponse(sb.ToString());
            }
            PageResponse("<option value=-1>-无可选择景点-</option>");
        }
Esempio n. 3
0
        /// <summary>
        /// 酒店房型下拉
        /// </summary>
        private void HotelRoomType()
        {
            MSourceHotel model = new BSource().GetOneHotelModel(Utils.GetQueryStringValue("sourceId"));

            if (model != null && model.HotelRoomList != null && model.HotelRoomList.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("<option value=-1>-请选择-</option>");
                foreach (MSourceHotelRoom item in model.HotelRoomList)
                {
                    sb.Append("<option value=" + item.RoomId + ">" + item.TypeName + "</option>");
                }
                PageResponse(sb.ToString());
            }
            PageResponse("<option value=-1>-无可选择房型-</option>");
        }
Esempio n. 4
0
        /// <summary>
        /// 酒店房型下拉
        /// </summary>
        private void GetShipCompany()
        {
            MSourceShip model = new BSource().GetShipModel(Utils.GetQueryStringValue("sourceId"));

            if (model != null && model.SubShipList != null && model.SubShipList.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("<option value=-1>-请选择-</option>");
                foreach (MSourceSubShip item in model.SubShipList)
                {
                    sb.Append("<option value=" + item.SubId + ">" + item.ShipName + "</option>");
                }
                AjaxResponse(sb.ToString());
            }
            AjaxResponse("<option value=-1>-无可选择房型-</option>");
        }
Esempio n. 5
0
 /// <summary>
 /// 黑名单操作
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 private string HmdData(string id)
 {
     if (!string.IsNullOrEmpty(id))
     {
         EyouSoft.BLL.SourceStructure.BSource bll = new BSource();
         if (bll.UpdateTravelAccountStatus(id, EyouSoft.Model.EnumType.ComStructure.UserStatus.黑名单, "", null, false) == 1)
         {
             return(UtilsCommons.AjaxReturnJson("1", "已加入黑名单"));
         }
         else
         {
             return(UtilsCommons.AjaxReturnJson("0", "黑名单设置失败"));
         }
     }
     return(UtilsCommons.AjaxReturnJson("0", "未选择任何行"));
 }
Esempio n. 6
0
        /// <summary>
        /// 获取联系人信息
        /// </summary>
        /// <param name="sid">供应商编号</param>
        /// <returns></returns>
        protected string GetContactInfo(object sid, string type)
        {
            string sourceID = sid.ToString();

            EyouSoft.BLL.SourceStructure.BSource            bll   = new BSource();
            EyouSoft.Model.SourceStructure.MSourceMotorcade model = bll.GetMotorcadeModel(sourceID);
            StringBuilder stb = new System.Text.StringBuilder();

            if (model != null)
            {
                IList <EyouSoft.Model.CrmStructure.MCrmLinkman> list = model.LinkManList;
                bool IsPermission = false;
                bool IsRecommend  = false;
                if (model.SourceModel != null)
                {
                    IsPermission = model.SourceModel.IsPermission;
                    IsRecommend  = model.SourceModel.IsRecommend;
                }
                switch (type)
                {
                //供应商是否签单和推荐
                case "icon":
                    stb.Append(EyouSoft.Common.UtilsCommons.GetCompanyRecommend((object)IsRecommend, (object)IsPermission));
                    break;

                case "name":
                    if (list != null && list.Count > 0)
                    {
                        stb.Append(list[0].Name);
                    }
                    break;

                case "tel":
                    if (list != null && list.Count > 0)
                    {
                        stb.Append(string.IsNullOrEmpty(list[0].Telephone) ? list[0].MobilePhone : list[0].Telephone);
                    }
                    break;

                case "fax":
                    if (list != null && list.Count > 0)
                    {
                        stb.Append(list[0].Fax);
                    }
                    break;

                case "list":
                    if (list != null && list.Count > 0)
                    {
                        stb.Append("<table cellspacing='0' cellpadding='0' border='0' width='100%' class='pp-tableclass'><tr class='pp-table-title'><th height='23' width='7%' align='center'>编号</th><th width='19%' align='center'>联系人</th><th align='center' width='20%'>电话</th><th align='center'>手机</th><th align='center' width='18%'>传真</th></tr>");
                        for (int i = 0; i < list.Count; i++)
                        {
                            stb.Append("<tr><td align='center' width='7%'>" + (i + 1).ToString() + "</td><td  width='19%' align='center'>" + list[i].Name + "</td><td align='center' width='20%'>" + list[i].Telephone + "</td><td align='center' width='18%'>" + list[i].MobilePhone + "</td><td align='center' width='19%'>" + list[i].Fax + "</td></tr>");
                        }
                        stb.Append("</table>");
                    }
                    break;
                }
            }
            return(stb.ToString());
        }
Esempio n. 7
0
        private void BlockSetup_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (op.GetType() == typeof(BSource))
            {
                BSource SrcOp = (BSource)op;

                if (Input.TryParse(textBox2.Text, out double tempAtt) && Input.TryParse(textBox1.Text, out double tempFreq) && Input.TryParse(textBox3.Text, out double tempBand) && Input.TryParse(textBox4.Text, out double tempStep))
                {
                    if (!SrcOp.Setup(tempFreq, tempStep, tempBand, tempAtt))
                    {
                        MessageBox.Show("Недопустимые значения");
                    }
                }
                else
                {
                    MessageBox.Show("Ошибка ввода");
                }
            }
            else if (op.GetType() == typeof(BAttenuator))
            {
                BAttenuator SrcOp = (BAttenuator)op;

                if (Input.TryParse(textBox2.Text, out double tempAtt))
                {
                    if (!SrcOp.Setup(tempAtt))
                    {
                        MessageBox.Show("Недопустимые значения");
                    }
                }
                else
                {
                    MessageBox.Show("Ошибка ввода");
                }
            }
            else if (op.GetType() == typeof(BFilter))
            {
                BFilter SrcOp = (BFilter)op;

                int index = comboBox1.SelectedIndex;
                if (index < 0 || index > Form1.Filters.Count - 1)
                {
                    return;
                }
                if (!SrcOp.Setup(Form1.Filters[index]))
                {
                    MessageBox.Show("Фильтр не выбран");
                }
            }
            else if (op.GetType() == typeof(BMixer))
            {
                BMixer SrcOp = (BMixer)op;

                if (Input.TryParse(textBox2.Text, out double tempOrder) && Input.TryParse(textBox1.Text, out double Fpr))
                {
                    double Fget = 0;
                    if (FinFgetChk.Checked)
                    {
                        Fget = Fin - Fpr;
                    }
                    else
                    {
                        Fget = Fin + Fpr;
                    }

                    SrcOp.Setup(Fget, (int)tempOrder, FinFgetChk.Checked);
                }
            }
        }
Esempio n. 8
0
        public BlockSetup(IBlock operation, double Fin)
        {
            InitializeComponent();

            op       = operation;
            this.Fin = Fin;
            if (operation.GetType() == typeof(BSource))
            {
                BSource SrcOp = (BSource)operation;

                textBox2.Text = SrcOp.Att.ToString();
                textBox1.Text = SrcOp.Freq.ToString();
                textBox3.Text = SrcOp.Band.ToString();
                textBox4.Text = SrcOp.Step.ToString();

                Size = new Size(253, 141);
            }
            else if (operation.GetType() == typeof(BAttenuator))
            {
                BAttenuator SrcOp = (BAttenuator)operation;

                textBox2.Text    = SrcOp.Att.ToString();
                label2.Text      = "Затухание, dB";
                textBox1.Visible = false;
                textBox3.Visible = false;
                textBox4.Visible = false;

                Size = new Size(253, 141);
            }
            else if (operation.GetType() == typeof(BFilter))
            {
                BFilter SrcOp = (BFilter)operation;

                textBox2.Visible = false;
                textBox1.Visible = false;
                textBox3.Visible = false;
                textBox4.Visible = false;

                foreach (var item in Form1.Filters)
                {
                    comboBox1.Items.Add(item.Name);
                }
            }
            else if (operation.GetType() == typeof(BMixer))
            {
                BMixer SrcOp = (BMixer)operation;

                label3.Visible   = false;
                textBox3.Visible = false;
                label4.Visible   = false;
                textBox4.Visible = false;

                FinFgetChk.Visible = true;
                FinFgetChk.Checked = SrcOp.FinBelowFget;
                label1.Text        = "Fpr, MHz";
                if (FinFgetChk.Checked)
                {
                    textBox1.Text = (Fin - SrcOp.Fget).ToString();
                }
                else
                {
                    textBox1.Text = (Fin + SrcOp.Fget).ToString();
                }

                label2.Text   = "Порядок, 3-5";
                textBox2.Text = SrcOp.Order.ToString();
            }
        }
Esempio n. 9
0
 public SourceSetupPanel(BSource op, string caption)
 {
     InitializeComponent();
     this.op           = op;
     MainGroupBox.Text = caption;
 }