Esempio n. 1
0
        private string SaveData()
        {
            string tmpVal = string.Empty;

            // 先把选中的城市设置为出港城市,然后查出现在公司的出港城市并初始化到父页面
            string[] IdList   = (!String.IsNullOrEmpty(Request.QueryString["IdList"])) ? Request.QueryString["IdList"].ToString().Split(',') : null;
            string[] NameList = (!String.IsNullOrEmpty(Request.QueryString["NameList"])) ? Request.QueryString["NameList"].ToString().Split(',') : null;
            if (IdList == null)
            {
                MessageBox.ShowAndReturnBack(this, "请选择要设置的出港城市!", 1);
            }
            else
            {
                EyouSoft.IBLL.CompanyStructure.ICompanyCity     bll  = EyouSoft.BLL.CompanyStructure.CompanyCity.CreateInstance();
                IList <EyouSoft.Model.SystemStructure.CityBase> list = new List <EyouSoft.Model.SystemStructure.CityBase>();
                if (IdList.Length > 0)
                {
                    for (int i = 0; i < IdList.Length; i++)
                    {
                        EyouSoft.Model.SystemStructure.CityBase model = new EyouSoft.Model.SystemStructure.CityBase();
                        model.CityId       = int.Parse(IdList[i]);
                        model.CityName     = NameList[i];
                        model.ProvinceId   = 0;
                        model.ProvinceName = string.Empty;
                        list.Add(model);
                    }
                    if (bll.SetCompanyPortCity(CompanyId, list))
                    {
                        tmpVal = BindLeaveCity(Utils.GetInt(SelectedVal), CompanyId);
                    }
                }
            }
            return(tmpVal);
        }
Esempio n. 2
0
        private string InitSelectLeaveCity()
        {
            StringBuilder str = new StringBuilder();

            EyouSoft.IBLL.CompanyStructure.ICompanyCity     bll  = EyouSoft.BLL.CompanyStructure.CompanyCity.CreateInstance();
            IList <EyouSoft.Model.SystemStructure.CityBase> list = bll.GetCompanyPortCity(CompanyId);

            if (list != null && list.Count > 0)
            {
                int i = 1;
                foreach (EyouSoft.Model.SystemStructure.CityBase model in list)
                {
                    if (i != 0 && i % 3 == 1)
                    {
                        str.Append("<tr class=\"baidi\">");
                    }
                    str.AppendFormat("<td width=\"10%\" align=\"right\" bgcolor=\"#FFFFFF\"><input name=\"chkSelectLeaveCityID\" type=\"checkbox\" value=\"{0}|{1}\" checked=\"checked\" /></td>", model.CityId, model.CityName);
                    str.AppendFormat("<td width=\"20%\" align=\"left\" bgcolor=\"#FFFFFF\">{0}</td>", model.CityName);
                    if (i != 0 && i % 3 == 0)
                    {
                        str.Append("</tr>");
                    }
                    i++;
                }
            }
            list = null;
            bll  = null;
            return(str.ToString());
        }
Esempio n. 3
0
 /// <summary>
 /// 创建IBLL实例对象
 /// </summary>
 /// <returns></returns>
 public static EyouSoft.IBLL.CompanyStructure.ICompanyCity CreateInstance()
 {
     EyouSoft.IBLL.CompanyStructure.ICompanyCity op = null;
     if (op == null)
     {
         op = EyouSoft.Component.Factory.ComponentFactory.Create <EyouSoft.IBLL.CompanyStructure.ICompanyCity>();
     }
     return(op);
 }
Esempio n. 4
0
        /// <summary>
        /// 绑定城市
        /// </summary>
        private void BindCity()
        {
            EyouSoft.IBLL.CompanyStructure.ICompanyCity     bll  = EyouSoft.BLL.CompanyStructure.CompanyCity.CreateInstance();
            IList <EyouSoft.Model.SystemStructure.CityBase> list = bll.GetCompanyPortCity(SiteUserInfo.CompanyID);

            if (list != null && list.Count > 0)
            {
                rpt_DepartureCity.DataSource = list;
                rpt_DepartureCity.DataBind();
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 绑定销售城市
        /// </summary>
        private string InitSaleCity(IList <int> SaleCityIdList)
        {
            StringBuilder str = new StringBuilder();

            EyouSoft.IBLL.CompanyStructure.ICompanyCity     bll  = EyouSoft.BLL.CompanyStructure.CompanyCity.CreateInstance();
            IList <EyouSoft.Model.SystemStructure.CityBase> list = bll.GetCompanySaleCity(CompanyId);

            if (list != null && list.Count > 0)
            {
                int i = 0;
                foreach (EyouSoft.Model.SystemStructure.CityBase model in list)
                {
                    int tmpSaleCityID = 0;
                    if (SaleCityIdList != null)
                    {
                        int j = 0;
                        foreach (int SaleCityId in SaleCityIdList)
                        {
                            if (SaleCityId == model.CityId)
                            {
                                tmpSaleCityID = model.CityId;
                                break;
                            }
                        }
                    }
                    if (i == 0)
                    {
                        if (tmpSaleCityID == model.CityId)
                        {
                            str.AppendFormat("<label for=\"AddQuickRoute_chkSaleCity{0}\" hideFocus=\"false\"><input type=\"checkbox\" name=\"AddQuickRoute_chkSaleCity\" value=\"{0}\" id=\"AddQuickRoute_chkSaleCity{0}\" checked valid=\"requireChecked\" errmsg=\"请选择销售城市!\" errmsgend=\"AddQuickRoute_chkSaleCity\" />{1}</label>", model.CityId.ToString(), model.CityName);
                        }
                        else
                        {
                            str.AppendFormat("<label for=\"AddQuickRoute_chkSaleCity{0}\" hideFocus=\"false\"><input type=\"checkbox\" name=\"AddQuickRoute_chkSaleCity\" value=\"{0}\" id=\"AddQuickRoute_chkSaleCity{0}\" valid=\"requireChecked\" errmsg=\"请选择销售城市!\" errmsgend=\"AddQuickRoute_chkSaleCity\" />{1}</label>", model.CityId.ToString(), model.CityName);
                        }
                    }
                    else
                    {
                        if (tmpSaleCityID == model.CityId)
                        {
                            str.AppendFormat("<label for=\"AddQuickRoute_chkSaleCity{0}\" hideFocus=\"false\"><input type=\"checkbox\" name=\"AddQuickRoute_chkSaleCity\" value=\"{0}\" id=\"AddQuickRoute_chkSaleCity{0}\" checked />{1}</label>", model.CityId.ToString(), model.CityName);
                        }
                        else
                        {
                            str.AppendFormat("<label for=\"AddQuickRoute_chkSaleCity{0}\" hideFocus=\"false\"><input type=\"checkbox\" name=\"AddQuickRoute_chkSaleCity\" value=\"{0}\" id=\"AddQuickRoute_chkSaleCity{0}\" />{1}</label>", model.CityId.ToString(), model.CityName);
                        }
                    }
                    i++;
                }
            }
            return(str.ToString());
        }
Esempio n. 6
0
 /// <summary>
 /// 绑定销售区域
 /// </summary>
 private void SalesArea()
 {
     if (SiteUserInfo != null)
     {
         EyouSoft.IBLL.CompanyStructure.ICompanyCity     bll  = EyouSoft.BLL.CompanyStructure.CompanyCity.CreateInstance();
         IList <EyouSoft.Model.SystemStructure.CityBase> list = bll.GetCompanySaleCity(SiteUserInfo.CompanyID);
         if (list != null && list.Count > 0)
         {
             rpt_SalesArea.DataSource = list;
             rpt_SalesArea.DataBind();
             sp_SalesAreaMsg.Visible = false;
         }
     }
 }
Esempio n. 7
0
        /// <summary>
        /// 绑定出发城市
        /// </summary>
        private void BindGoCity()
        {
            EyouSoft.IBLL.CompanyStructure.ICompanyCity     bll  = EyouSoft.BLL.CompanyStructure.CompanyCity.CreateInstance();
            IList <EyouSoft.Model.SystemStructure.CityBase> list = bll.GetCompanyPortCity(SiteUserInfo.CompanyID);

            if (list != null && list.Count > 0)
            {
                ddl_goCity.AppendDataBoundItems = true;
                ddl_goCity.DataTextField        = "CityName";
                ddl_goCity.DataValueField       = "CityId";
                ddl_goCity.DataSource           = list;
                ddl_goCity.DataBind();
            }
        }
Esempio n. 8
0
        private string BindLeaveCity(int LeaveCity, string CompanyId)
        {
            StringBuilder str1 = new StringBuilder();  // 当前公司注册时所在省份的出港城市
            StringBuilder str2 = new StringBuilder();  // 固定城市

            EyouSoft.IBLL.CompanyStructure.ICompanyCity bll = EyouSoft.BLL.CompanyStructure.CompanyCity.CreateInstance();
            var modelcompanyinfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(CompanyId);
            IList <EyouSoft.Model.SystemStructure.CityBase> list = bll.GetCompanyPortCity(CompanyId);

            if (list != null && list.Count > 0)
            {
                string[] defaultcity = EyouSoft.Common.ConfigModel.ConfigClass.GetConfigString("DefaultCity").Split(',');
                foreach (CityBase modelcity in list)
                {
                    if (!defaultcity.Contains(modelcity.CityId.ToString()))
                    {
                        if (modelcity.CityId == LeaveCity)
                        {
                            str1.AppendFormat("<label for=\"AddStandardTour_rad{2}{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddStandardTour_rad{2}\" id=\"AddStandardTour_rad{2}{0}\" checked value=\"{0}\" />{1}</label>", modelcity.CityId, modelcity.CityName, type);
                        }
                        else
                        {
                            str1.AppendFormat("<label for=\"AddStandardTour_rad{2}{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddStandardTour_rad{2}\" id=\"AddStandardTour_rad{2}{0}\" value=\"{0}\" />{1}</label>", modelcity.CityId.ToString(), modelcity.CityName, type);
                        }
                    }
                }

                foreach (string str in defaultcity)
                {
                    SysCity item = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(Utils.GetInt(str));
                    if (str == LeaveCity.ToString())
                    {
                        str2.AppendFormat("<label for=\"AddStandardTour_rad{2}{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddStandardTour_rad{2}\" id=\"AddStandardTour_rad{2}{0}\" checked  value=\"{0}\" />{1}</label>", item.CityId, item.CityName, type);
                    }
                    else
                    {
                        str2.AppendFormat("<label for=\"AddStandardTour_rad{2}{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddStandardTour_rad{2}\" id=\"AddStandardTour_rad{2}{0}\" value=\"{0}\" />{1}</label>", item.CityId, item.CityName, type);
                    }
                }
            }
            if (!string.IsNullOrEmpty(str1.ToString()))
            {
                return(str1.ToString() + "|" + str2.ToString() + "| <a href=\"javascript:void(0)\" onclick=\"TourModule.OpenDialog('设置常用出港城市','/LineManage/SetLeaveCity.aspx?ReleaseType=AddStandardTour&CompanyId=" + CompanyId + "&type=BackCity&ContainerID=" + ContainerID + "&rnd='+ Math.random(),650,450);return false;\"><span class=\"huise\">更多</span></a>");
            }
            else
            {
                return(str2.ToString() + "| <a href=\"javascript:void(0)\" onclick=\"TourModule.OpenDialog('设置常用出港城市','/LineManage/SetLeaveCity.aspx?ReleaseType=AddStandardTour&CompanyId=" + CompanyId + "&type=BackCity&ContainerID=" + ContainerID + "&rnd='+ Math.random(),650,450);return false;\"><span class=\"huise\">更多</span></a>");
            }
        }
Esempio n. 9
0
        private string InitLeaveCity(int LeaveCity)
        {
            StringBuilder str1 = new StringBuilder();  // 当前公司注册时所在省份的出港城市
            StringBuilder str2 = new StringBuilder();  // 设置过的出港城市

            EyouSoft.IBLL.CompanyStructure.ICompanyCity     bll  = EyouSoft.BLL.CompanyStructure.CompanyCity.CreateInstance();
            IList <EyouSoft.Model.SystemStructure.CityBase> list = bll.GetCompanyPortCity(CompanyId);

            if (list != null && list.Count > 0)
            {
                int i = 0;
                foreach (EyouSoft.Model.SystemStructure.CityBase model in list)
                {
                    if (model.ProvinceId == UserInfoModel.ProvinceId)
                    {
                        if (LeaveCity == model.CityId)
                        {
                            if (i == 0)
                            {
                                str1.AppendFormat("<label for=\"AddQuickRoute_radPortCity{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddQuickRoute_radPortCity\" id=\"AddQuickRoute_radPortCity{0}\" checked value=\"{0}\" valid=\"requiredRadioed\" errmsg=\"请选择出港城市!\" errmsgend=\"AddQuickRoute_radPortCity\" />{1}</label>", model.CityId, model.CityName);
                            }
                            else
                            {
                                str1.AppendFormat("<label for=\"AddQuickRoute_radPortCity{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddQuickRoute_radPortCity\" id=\"AddQuickRoute_radPortCity{0}\" checked value=\"{0}\" />{1}</label>", model.CityId, model.CityName);
                            }
                        }
                        else
                        {
                            if (i == 0)
                            {
                                str1.AppendFormat("<label for=\"AddQuickRoute_radPortCity{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddQuickRoute_radPortCity\" id=\"AddQuickRoute_radPortCity{0}\" value=\"{0}\" valid=\"requiredRadioed\" errmsg=\"请选择出港城市!\" errmsgend=\"AddQuickRoute_radPortCity\" />{1}</label>", model.CityId, model.CityName);
                            }
                            else
                            {
                                str1.AppendFormat("<label for=\"AddQuickRoute_radPortCity{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddQuickRoute_radPortCity\" id=\"AddQuickRoute_radPortCity{0}\" value=\"{0}\" />{1}</label>", model.CityId, model.CityName);
                            }
                        }
                    }
                    else
                    {
                        if (LeaveCity == model.CityId)
                        {
                            if (i == 0)
                            {
                                str2.AppendFormat("<label for=\"AddQuickRoute_radPortCity{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddQuickRoute_radPortCity\" id=\"AddQuickRoute_radPortCity{0}\" value=\"{0}\" checked valid=\"requiredRadioed\" errmsg=\"请选择出港城市!\" errmsgend=\"AddQuickRoute_radPortCity\" />{1}</label>", model.CityId, model.CityName);
                            }
                            else
                            {
                                str2.AppendFormat("<label for=\"AddQuickRoute_radPortCity{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddQuickRoute_radPortCity\" id=\"AddQuickRoute_radPortCity{0}\" value=\"{0}\" checked />{1}</label>", model.CityId, model.CityName);
                            }
                        }
                        else
                        {
                            if (i == 0)
                            {
                                str2.AppendFormat("<label for=\"AddQuickRoute_radPortCity{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddQuickRoute_radPortCity\" id=\"AddQuickRoute_radPortCity{0}\" value=\"{0}\" valid=\"requiredRadioed\" errmsg=\"请选择出港城市!\" errmsgend=\"AddQuickRoute_radPortCity\" />{1}</label>", model.CityId, model.CityName);
                            }
                            else
                            {
                                str2.AppendFormat("<label for=\"AddQuickRoute_radPortCity{0}\" hideFocus=\"false\"><input type=\"radio\" name=\"AddQuickRoute_radPortCity\" id=\"AddQuickRoute_radPortCity{0}\" value=\"{0}\" />{1}</label>", model.CityId, model.CityName);
                            }
                        }
                    }

                    i++;
                }
            }
            if (str1.ToString() != string.Empty)
            {
                if (str2.ToString() != string.Empty)
                {
                    return(str1.ToString() + "|" + str2.ToString() + "| <a href=\"javascript:void(0)\" onclick=\"TourModule.OpenDialog('设置常用出港城市','/RouteAgency/SetLeaveCity.aspx?ReleaseType=AddQuickRoute&ContainerID=" + tblID + "&rnd='+ Math.random(),650,450);return false;\"><span class=\"huise\">更多</span></a>");
                }
                else
                {
                    return(str1.ToString() + "| <a href=\"javascript:void(0)\" onclick=\"TourModule.OpenDialog('设置常用出港城市','/RouteAgency/SetLeaveCity.aspx?ReleaseType=AddQuickRoute&ContainerID=" + tblID + "&rnd='+ Math.random(),650,450);return false;\"><span class=\"huise\">更多</span></a>");
                }
            }
            else
            {
                if (str2.ToString() != string.Empty)
                {
                    return(str2.ToString() + "| <a href=\"javascript:void(0)\" onclick=\"TourModule.OpenDialog('设置常用出港城市','/RouteAgency/SetLeaveCity.aspx?ReleaseType=AddQuickRoute&ContainerID=" + tblID + "&rnd='+ Math.random(),650,450);return false;\"><span class=\"huise\">更多</span></a>");
                }
                else
                {
                    return("<a href=\"javascript:void(0)\" onclick=\"TourModule.OpenDialog('设置常用出港城市','/RouteAgency/SetLeaveCity.aspx?ReleaseType=AddQuickRoute&ContainerID=" + tblID + "&rnd='+ Math.random(),650,450);return false;\"><span class=\"huise\">更多</span></a>");
                }
            }
        }
Esempio n. 10
0
        private string BindLeaveCity(string type)
        {
            //拼接字符串容器
            StringBuilder str = new StringBuilder();

            EyouSoft.IBLL.CompanyStructure.ICompanyCity bll = EyouSoft.BLL.CompanyStructure.CompanyCity.CreateInstance();

            IList <EyouSoft.Model.SystemStructure.CityBase> list = bll.GetCompanyPortCity(UserInfoModel.CompanyID);

            if (list != null && list.Count > 0)
            {
                //随机生成同组
                string nameval = Guid.NewGuid().ToString();
                switch (type)
                {
                case "a":
                    foreach (EyouSoft.Model.SystemStructure.CityBase model in list)
                    {
                        str.AppendFormat("<a class=\"a_City\" href=\"javascript:void(0);\" value=\"{0}\"cname=\"{1}\">{1}</a>", model.CityId, model.CityName);
                    }
                    break;

                case "radio":
                    foreach (EyouSoft.Model.SystemStructure.CityBase model in list)
                    {
                        str.AppendFormat("<input name={0} type=radio value={1} cname={2} class={3} />{2}", nameval, model.CityId, model.CityName, Utils.GetQueryStringValue("inputclass"));
                    }
                    break;
                }
                return(str.ToString());
            }
            return(string.Empty);
            //StringBuilder str1 = new StringBuilder();  // 当前公司注册时所在省份的出港城市
            //StringBuilder str2 = new StringBuilder();  // 设置过的出港城市

            //EyouSoft.IBLL.CompanyStructure.ICompanyCity bll = EyouSoft.BLL.CompanyStructure.CompanyCity.CreateInstance();
            //IList<EyouSoft.Model.SystemStructure.CityBase> list = bll.GetCompanyPortCity(UserInfoModel.CompanyID);
            //if (list != null && list.Count > 0)
            //{
            //    int i = 0;
            //    foreach (EyouSoft.Model.SystemStructure.CityBase model in list)
            //    {
            //        if (model.ProvinceId == UserInfoModel.ProvinceId)
            //        {
            //            if (i == 0)
            //            {
            //                str1.AppendFormat("<label for=\"" + ReleaseType + "_radPortCity{0}\"><input type=\"radio\" name=\"" + ReleaseType + "_radPortCity\" id=\"" + ReleaseType + "_radPortCity{0}\" value=\"{0}\" valid=\"requiredRadioed\" errmsg=\"请选择出港城市!\" errmsgend=\"" + ReleaseType + "_radPortCity\" />{1}</label>", model.CityId, model.CityName);
            //            }
            //            else
            //            {
            //                str1.AppendFormat("<label for=\"" + ReleaseType + "_radPortCity{0}\"><input type=\"radio\" name=\"" + ReleaseType + "_radPortCity\" id=\"" + ReleaseType + "_radPortCity{0}\" value=\"{0}\" />{1}</label>", model.CityId, model.CityName);
            //            }
            //        }
            //        else
            //        {
            //            if (i == 0)
            //            {
            //                str2.AppendFormat("<label for=\"" + ReleaseType + "_radPortCity{0}\"><input type=\"radio\" name=\"" + ReleaseType + "_radPortCity\" id=\"" + ReleaseType + "_radPortCity{0}\" value=\"{0}\" valid=\"requiredRadioed\" errmsg=\"请选择出港城市!\" errmsgend=\"" + ReleaseType + "_radPortCity\" />{1}</label>", model.CityId, model.CityName);
            //            }
            //            else
            //            {
            //                str2.AppendFormat("<label for=\"" + ReleaseType + "_radPortCity{0}\"><input type=\"radio\" name=\"" + ReleaseType + "_radPortCity\" id=\"" + ReleaseType + "_radPortCity{0}\" value=\"{0}\" />{1}</label>", model.CityId, model.CityName);
            //            }
            //        }
            //        i++;
            //    }
            //}

            //if (str1.ToString() != string.Empty)
            //{
            //    if (str2.ToString() != string.Empty)
            //    {
            //        return str1.ToString() + "|" + str2.ToString(); //+ "| <a href=\"javascript:void(0)\" onclick=\"TourModule.OpenDialog('设置常用出港城市','/RouteAgency/SetLeaveCity.aspx?ReleaseType=AddStandardTour&ContainerID=" + ContainerID + "&rnd='+ Math.random(),650,450);return false;\"><span class=\"huise\">更多</span></a>";
            //    }
            //    else
            //    {
            //        return str1.ToString();// +"| <a href=\"javascript:void(0)\" onclick=\"TourModule.OpenDialog('设置常用出港城市','/RouteAgency/SetLeaveCity.aspx?ReleaseType=AddStandardTour&ContainerID=" + ContainerID + "&rnd='+ Math.random(),650,450);return false;\"><span class=\"huise\">更多</span></a>";
            //    }
            //}
            //else
            //{
            //    if (str2.ToString() != string.Empty)
            //    {
            //        return str2.ToString();// +"| <a href=\"javascript:void(0)\" onclick=\"TourModule.OpenDialog('设置常用出港城市','/RouteAgency/SetLeaveCity.aspx?ReleaseType=AddStandardTour&ContainerID=" + ContainerID + "&rnd='+ Math.random(),650,450);return false;\"><span class=\"huise\">更多</span></a>";
            //    }
            //    else
            //    {
            //        return string.Empty;//"<a href=\"javascript:void(0)\" onclick=\"TourModule.OpenDialog('设置常用出港城市','/RouteAgency/SetLeaveCity.aspx?ReleaseType=AddStandardTour&ContainerID=" + ContainerID + "&rnd='+ Math.random(),650,450);return false;\"><span class=\"huise\">更多</span></a>";
            //    }
            //}
        }