示例#1
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;
         }
     }
 }
示例#2
0
        private void Bind()
        {
            SearchProductDetail snt = new SearchProductDetail();

            snt.IsEnglish = 1;
            if (type == 0)
            {
            }
            else
            {
                snt.ProTypeID = type;
            }
            Pagination pagination = new DevNet.Common.Pagination(pager.PageIndex, pager.PageSize, 0);

            using (BLLProductDetail bll = new BLLProductDetail())
            {
                List <ProductDetail> lists = bll.GetPageList(snt, pagination);
                rptProduct.DataSource = lists;
                rptProduct.DataBind();
                pager.RecordCount = pagination.RecordCount;
            }
            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;
                }
            }
        }
示例#3
0
        private void ShowMenu()
        {
            if (type == 14)
            {
                Title = "成功案例";
            }
            else
            {
                Title = "生产设备";
            }
            int IsEnglish = Session["isEnglish"] == null ? 1 : Convert.ToInt32(Session["isEnglish"]);

            string[] fileds = new string[] { "id", "IsEnglish" };
            object[] values = new object[] { id, IsEnglish };
            using (BLLSuccessStories BLL = new BLLSuccessStories())
            {
                SuccessStories obj = new SuccessStories();
                obj = BLL.GetSingle(fileds, values);
                if (obj != null)
                {
                    lblTitle.Text   = GetStrByLength(obj.SSName, 30);
                    lblContent.Text = obj.SSContent;
                    image.Src       = obj.SSPic;
                }
            }
            using (BLLCompanyInformationType bll = new BLLCompanyInformationType())
            {
                CompanyInformationType contype = bll.GetSingle(type);
                if (contype != null)
                {
                    Title = contype.CompanyInformationName;
                }
            }
        }
        private void ShowPro()
        {
            int IsEnglish = Session["isEnglish"] == null ? 1 : Convert.ToInt32(Session["isEnglish"]);

            string[] fileds = new string[] { "id", "IsEnglish" };
            object[] values = new object[] { id, IsEnglish };
            using (BLLProductDetail BLL = new BLLProductDetail())
            {
                ProductDetail obj = new ProductDetail();
                obj = BLL.GetSingle(fileds, values);
                if (obj != null)
                {
                    lblTitle.Text   = GetStrByByteLength(obj.ProductName, 30, true);
                    lblContent.Text = obj.ProductContent;
                    image.Src       = phoneImgUrl(Convert.ToString(obj.ProductPic));
                    //lblTime.Text = string.Format("{0:D}", obj.AddTime);
                }
            }

            using (BLLCompanyInformationType bll = new BLLCompanyInformationType())
            {
                CompanyInformationType contype = bll.GetSingle(type);
                if (contype != null)
                {
                    Title = contype.CompanyInformationName;
                }
            }
        }
 /// <summary>
 /// 获取公司信息类别名称
 /// </summary>
 protected string GetProInforTypeName(int proinfotype)
 {
     using (BLLCompanyInformationType bll = new BLLCompanyInformationType())
     {
         CompanyInformationType obj = new CompanyInformationType();
         if (proinfotype > 0)
         {
             obj = bll.GetSingle(proinfotype);
             if (obj != null)
             {
                 return(obj.CompanyInformationName.ToString());
             }
         }
         return("");
     }
 }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLCompanyInformationType bll = new BLLCompanyInformationType())
            {
                CompanyInformationType obj = new CompanyInformationType();

                if (id > 0)
                {
                    obj    = bll.GetSingle(id);
                    obj.ID = id;
                }
                obj.CompanyInformationName = txtCompanyInforTypeName.Text.Trim().ToString();
                obj.Remarks = txtRemarks.Text.ToString();
                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, "保存成功", "CompanyInformationTypeList.aspx");
                }
            }
        }
 private void setInfo()
 {
     if (id > 0)
     {
         using (BLLCompanyInformationType bll = new BLLCompanyInformationType())
         {
             CompanyInformationType cpinfor = bll.GetSingle(id);
             if (cpinfor != null)
             {
                 if (cpinfor.IsEnglish == 1)
                 {
                     rbtnIsChinese.Checked = true;
                 }
                 else if (cpinfor.IsEnglish == 2)
                 {
                     rbtnIsEnglish.Checked = true;
                 }
                 txtCompanyInforTypeName.Text = cpinfor.CompanyInformationName;
                 txtRemarks.Text = cpinfor.Remarks;
             }
         }
     }
 }