private void bindList()
        {
            SearchCompanyInformationDetails con = new SearchCompanyInformationDetails();

            if (ddlCompanyInforType.SelectedValue != "")
            {
                con.CpInforType = Convert.ToInt32(ddlCompanyInforType.SelectedValue);
            }
            if (rbtnIsChinese.Checked == true)
            {
                con.IsEnglish = 1;
            }
            else if (rbtnIsEnglish.Checked == true)
            {
                con.IsEnglish = 2;
            }
            Pagination pagina = new Pagination(pager.PageIndex, pager.PageSize, 0);

            using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
            {
                List <CompanyInformationDetails> lists = bll.GetPageList(con, pagina, CompanyInformationType.ID_FieldName, ScriptQuery.SortEnum.DESC);

                pager.RecordCount = pagina.RecordCount;
                pager.PageCount   = pagina.PageCount;

                grid_friendlink.DataSource = lists;
                grid_friendlink.DataBind();
            }
        }
Beispiel #2
0
 private void setInfo()
 {
     // 公司信息
     using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
     {
         if (type == 0)
         {
             type = 5;
         }
         string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" };
         object[] values = new object[] { type, 1 };
         // 公司简介
         CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values);
         if (cpinfor != null)
         {
             companyintroduce.Text = cpinfor.CompanyInformationDetail;
         }
         else
         {
         }
     }
     using (BLLCompanyInformationType bll = new BLLCompanyInformationType())
     {
         string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" };
         object[] values = new object[] { type, 1 };
         CompanyInformationType contype = bll.GetSingle(type);
         if (contype != null)
         {
             Title = contype.CompanyInformationName;
         }
     }
 }
        public static string OperateRecords(string ids, int op)
        {
            string[] array = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            using (BLLCompanyInformationType bll = new BLLCompanyInformationType())
            {
                foreach (string id in array)
                {
                    switch (op)
                    {
                    case 7:
                        using (BLLCompanyInformationDetails blls1 = new BLLCompanyInformationDetails())
                        {
                            SearchCompanyInformationDetails con3 = new SearchCompanyInformationDetails();
                            con3.CpInforType = Convert.ToInt32(id);

                            if (blls1.GetList(con3).Count > 0)
                            {
                                return("此公司信息类别下有相应的信息,不能删除!");
                            }
                        }
                        bll.Delete(id);
                        break;
                    }
                }

                if (bll.IsFail)
                {
                    return(ExceptionManager.GetErrorMsg(bll.DevNetException));
                }
            }
            return(string.Empty);
        }
        private void setInfo()
        {
            // 公司信息
            using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
            {
                if (type == 5)
                {
                    qianzhui.Text = "公司";
                    houzhui.Text  = "介绍";
                    yingwen.Text  = "ABOUT  US";
                }

                else if (type == 58)
                {
                    qianzhui.Text = "人才";
                    houzhui.Text  = "招聘";
                    yingwen.Text  = "Recruitment of talents";
                }
                else if (type == 62)
                {
                    qianzhui.Text = "企业";
                    houzhui.Text  = "文化";
                    yingwen.Text  = "BUSINESS CULTURE;";
                }
                else if (type == 44)
                {
                    qianzhui.Text = "联系";
                    houzhui.Text  = "我们";
                    yingwen.Text  = "CONTACT  US";
                }
                else
                {
                    type          = 5;
                    qianzhui.Text = "公司";
                    houzhui.Text  = "简介";
                    yingwen.Text  = "ABOUT  US";
                }
                string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" };
                object[] values = new object[] { type, 1 };

                // 公司简介
                CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values);
                if (cpinfor != null)
                {
                    companyintroduce.Text = cpinfor.CompanyInformationDetail;
                }
                else
                {
                }
            }
        }
 private void setContactsInfo()
 {
     // 公司信息
     using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
     {
         string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" };
         object[] values = new object[] { 44, 1 };
         CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values);
         if (cpinfor != null)
         {
             lblConatct.Text = cpinfor.CompanyInformationDetail;
         }
     }
 }
Beispiel #6
0
        private void jishao()
        {
            // 公司信息
            using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
            {
                string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" };
                object[] values = new object[] { 5, 1 };

                // 公司简介
                CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values);
                if (cpinfor != null)
                {
                    companyintroduce.Text = cpinfor.CompanyInformationDetail;
                }
                else
                {
                }
            }
        }
Beispiel #7
0
        private void bindinfo()
        {
            using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
            {
                //if (type == 5)
                //{
                //    type = 5;
                //    jianjie.Text = "公司简介";
                //    jianjie1.Text = "COMPANY PROFILE";
                //}
                //else if (type == 58)
                //{

                //    jianjie.Text = "销售网络";
                //    jianjie1.Text = " SALES NETWORK";
                //}
                //else if (type == 44)
                //{
                //    jianjie.Text = "联系我们";
                //    jianjie1.Text = "CONTACT US";
                //}
                //else
                //{
                //    type = 5;
                //    jianjie.Text = "公司简介";
                //    jianjie1.Text = "COMPANY PROFILE";
                //}
                string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" };
                object[] values = new object[] { type, 1 };

                // 公司简介
                CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values);
                if (cpinfor != null)
                {
                    companyintroduce.Text = cpinfor.CompanyInformationDetail;
                }
                else
                {
                }
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
            {
                CompanyInformationDetails obj = new CompanyInformationDetails();
                if (id > 0)
                {
                    obj = bll.GetSingle(id);
                }
                obj.CompanyInformationTypeID = Convert.ToInt32(ddlCompanyInforType.SelectedValue);
                obj.CompanyInformationDetail = txtContent.Value;
                obj.Remarks = txtRemarks.Text.ToString();
                obj.AddTime = System.DateTime.Now;
                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "CompanyInformationList.aspx");
                }
            }
        }
        public static string OperateRecords(string ids, int op)
        {
            string[] array = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
            {
                foreach (string id in array)
                {
                    switch (op)
                    {
                    case 7:
                        bll.Delete(id);

                        break;
                    }
                }

                if (bll.IsFail)
                {
                    return(ExceptionManager.GetErrorMsg(bll.DevNetException));
                }
            }
            return(string.Empty);
        }
 private void setInfo()
 {
     if (id > 0)
     {
         using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
         {
             CompanyInformationDetails cpinfor = bll.GetSingle(id);
             if (cpinfor != null)
             {
                 ddlCompanyInforType.SelectedValue = cpinfor.CompanyInformationTypeID.ToString();
                 txtContent.Value = cpinfor.CompanyInformationDetail;
                 txtRemarks.Text  = cpinfor.Remarks;
                 if (cpinfor.IsEnglish == 1)
                 {
                     rbtnIsChinese.Checked = true;
                 }
                 else if (cpinfor.IsEnglish == 2)
                 {
                     rbtnIsEnglish.Checked = true;
                 }
             }
         }
     }
 }
Beispiel #11
0
        private void setInfo()
        {
            // 公司信息
            using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
            {
                string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" };
                object[] values = new object[] { 5, 1 };

                // 公司简介
                CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values);
                if (cpinfor != null)
                {
                    string Htmlstring = Regex.Replace(cpinfor.CompanyInformationDetail, @"<(meta|iframe|frame|span|tbody|layer)[^>]*>|</(iframe|frame|meta|span|tbody|layer)>", "", RegexOptions.IgnoreCase);
                    if (Htmlstring.Length > 120)
                    {
                        //companyintroduce.Text = Htmlstring.Substring(0, 120) + "...";
                    }
                    else
                    {
                        //companyintroduce.Text = Htmlstring;
                    }
                }
            }
        }