Exemplo n.º 1
0
    public void GetAreaInfo()
    {
        GoodsModel model1 = new GoodsModel();
        GoodsBll   bll1   = new GoodsBll();

        model = bll.GetModel1(_Pid);

        model1            = bll1.GetModel(_Pid);
        this.txtname.Text = model1.serviceName;
        if (model != null)
        {
            //this.txtID.Text = model.sysnumber;
            this.txtPrice.Text = model.Price.ToString();
            this.txtValue.Text = model.value;
            //this.txtsysnumber.Visible =false ;
            //this.txtID.Visible = true;
            if (model.IsDefault == 1)
            {
                this.CheckDefault.SelectedValue = "1";
            }
            else
            {
                this.CheckDefault.SelectedValue = "0";
            }
        }
    }
Exemplo n.º 2
0
 public void GetAreaInfo()
 {
     model = bll.GetModel(_Pid);
     if (model != null)
     {
         this.txtName.Text   = model.serviceName;
         this.txtMethod.Text = model.serviceContext;
         this.txtSort.Text   = model.orderby.ToString();
     }
 }
Exemplo n.º 3
0
        public bool ModifyMatirialModel(Goods goods)
        {
            GoodsModel model = bllGoods.GetModel(goods.MaterialID);

            if (model == null)
            {
                return(false);
            }
            Goods_ClassModel classModel = bllGoodsClass.GetModelByClassName(goods.MaterialType);

            model.Goods_Class_ID = classModel.Goods_Class_ID;
            model.Goods_Code     = goods.MaterialCode;
            model.Goods_Flag     = goods.MaterialFlag;
            model.Goods_Name     = goods.MaterialName;
            model.Goods_Unit     = goods.MaterialUnit;
            model.Goods_Category = goods.MaterialType;
            model.Goods_Model    = goods.MaterialModel;
            return(bllGoods.Update(model));
        }
Exemplo n.º 4
0
    protected void InitForm()
    {
        //string signList = "";
        string sign = "";

        if (this.id != "")
        {
            GoodsModel mod = bll.GetModel(this.id);
            if (mod != null)
            {
                this.txtName.Value      = mod.GoodsName;
                this.txtOrder.Value     = mod.Orderby.ToString();
                this.txtRemarks.Text    = mod.Remarks;
                this.div_img.Visible    = true;
                this.Image1.ImageUrl    = mod.GoodsSmallPic;
                this.txtSampleDesc.Text = mod.GoodsSampleDesc;
                this.hzst_ckeditor.Text = mod.GoodsDesc;
                this.cselect.categoryID = mod.CategoryId;

                this.goodsCode = this.txtGoodsCode.Value = mod.GoodsCode;
                if (mod.IsHot == 1)
                {
                    this.cbIsHot.Checked = true;
                }
                if (mod.IsNew == 1)
                {
                    this.cbIsNew.Checked = true;
                }
                if (mod.IsRec == 1)
                {
                    this.cbIsRec.Checked = true;
                }
                //if (mod.IsSpe == 1) { this.cbIsSpe.Checked = true; }
                this.txtSalePrice.Value   = mod.SalePrice.ToString();
                this.txtMarketPrice.Value = mod.MarketPrice.ToString();
                if (mod.MorePropertys != "")
                {
                    this.ddlMorePropertys.SelectedValue = mod.MorePropertys;
                }
                this.rdIsSale.SelectedValue = mod.IsSale.ToString();
                this.hidOldGoodsCode.Value  = mod.GoodsCode;

                sign         = mod.signId;
                hfSign.Value = sign;

                //20160605

                //this.txtJobStartTime.Value = mod.JobStartTime.ToString("yyyy-MM-dd HH:mm");
                //this.txtJobEndTime.Value = mod.JobEndTime.ToString("yyyy-MM-dd HH:mm");
                this.ddlJobType.Value        = mod.JobType;
                this.txtTotalSaleCount.Value = mod.TotalSaleCount.ToString();

                //this.llRemark.Text = GetMemberPrice(this.id);
            }
        }
        else
        {
            this.txtGoodsCode.Value = IdCreator.CreateId("T_Goods_Info", "GoodsCode");
            if (this.cateId != "")   //this.ddlPCategory.SelectedValue = this.cateId;
            {
                this.cselect.categoryID = this.cateId;
            }
            //this.txtJobStartTime.Value = this.txtJobEndTime.Value = DateTime.Now.ToString("yyyy-MM-dd");
        }

        string strSQL = "";

        strSQL += "select * from T_Goods_Sign;";
        strSQL += "select * from T_Goods_Service order by orderby asc;";
        //strSQL += "select * from T_Goods_SignBind where goodsid='" + id + "';";
        AdoHelper     adohelper   = AdoHelper.CreateHelper(StarTech.Util.AppConfig.DBInstance);
        DataSet       ds          = adohelper.ExecuteSqlDataset(strSQL);
        List <string> signList    = new List <string>();
        List <string> serviceList = new List <string>();

        if (sign != "" && sign != null)
        {
            signList = sign.Split(',').ToList();
        }

        string llText = "";

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            if (signList.Contains(ds.Tables[0].Rows[i]["signid"].ToString().Trim()))
            {
                llText += "<input checked='checked' type='checkbox' signname='" + ds.Tables[0].Rows[i]["signname"].ToString() + "' signid='" + ds.Tables[0].Rows[i]["signid"].ToString() + "' class='ckSign' />";
            }
            else
            {
                llText += "<input type='checkbox' signname='" + ds.Tables[0].Rows[i]["signname"].ToString() + "' signid='" + ds.Tables[0].Rows[i]["signid"].ToString() + "' class='ckSign' />";
            }
            llText += ds.Tables[0].Rows[i]["signname"].ToString();
            if ((i + 1) % 6 == 0)
            {
                llText += "<br/>";
            }
            ltSign.Text = llText;
        }
    }