Ejemplo n.º 1
0
    //protected void GetFormInfo(ref ModGoodsType mod)
    //{
    //   // mod.typeName = this.txtTitle.Value.Trim();
    //   // mod.orderby = this.ChangeToIntValue(this.txtOrder.Value.Trim());
    //    //mod.remarks = this.txtRemarks.Text.Trim();
    //}



    protected void GetFormateInfo()
    {
        string    strSQL    = "delete T_Goods_Formate where goodsId='" + goodsId + "';";
        AdoHelper adohelper = AdoHelper.CreateHelper(StarTech.Util.AppConfig.DBInstance);

        adohelper.ExecuteSqlNonQuery(strSQL);
        //new TableObject("T_Goods_Formate").Util_DeleteBat("goodsId='" + this.goodsId + "'");
        GoodsFormateBll bll = new GoodsFormateBll();

        for (int i = 1; i < 100; i++)
        {
            if (Request["formate_code_" + i] == null)
            {
                break;
            }
            GoodsFormateModel mod = new GoodsFormateModel();
            mod.sysnumber          = Guid.NewGuid().ToString();
            mod.GoodsCode          = Request["formate_code_" + i];
            mod.GoodsId            = this.goodsId;
            mod.Price              = decimal.Parse(Request["formate_price_" + i]);
            mod.Stock              = int.Parse(Request["formate_stock_" + i]);
            mod.GoodsFormateValues = Request["formate_info_" + i];
            mod.GoodsFormateNames  = Request["formateAllNames"];
            bll.Add(mod);
        }
    }
Ejemplo n.º 2
0
    public int AjaxSave(string sysnumber, string info)
    {
        string[]          arr = info.Split('$');
        GoodsFormateBll   bll = new GoodsFormateBll();
        GoodsFormateModel mod = bll.GetModel(sysnumber);

        mod.GoodsCode = arr[0];
        mod.Price     = decimal.Parse(arr[1]);
        mod.Stock     = int.Parse(arr[2]);
        return(bll.Update(mod));
    }