Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     string paramType = Request["type"];
     if (string.IsNullOrEmpty(paramType))
     {
         Notification.Show(this, "错误", "传入参数有误", NotificationType.error,string.Empty,true,2000);
     }
     stockActivityType = (StockActivityType)Enum.Parse(typeof(StockActivityType), paramType);
     if (!IsPostBack)
     {
         BindList();
     }
 }
Esempio n. 2
0
 public BillStock(StockActivityType type)
     : this()
 {
     switch (type)
     {
         case NModel.StockActivityType.Export:
             BillNo = "CK" + BillNo;
             break;
         case NModel.StockActivityType.Import:
             BillNo = "RK" + BillNo;
             break;
     }
     this.StockActivityType = type;
 }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //入库 还是出库
        string paramType = Request["type"];
        if (string.IsNullOrEmpty(paramType))
        {
            throw new Exception("错误.请传入单据类型");
        }
        stockActivityType = (StockActivityType)Enum.Parse(typeof(StockActivityType), paramType);

        //单据id,为空则是新建
        string paramId = Request["Id"];
        if (string.IsNullOrEmpty(paramId))
        {
            isNew = true;

            billStock = new BillStock(stockActivityType);
            billStock.CreateMember = bizNtsMember.NM_GetUser(CurrentMember.UserName);
        }
        else
        {
            isNew = false;
            billStock = (BillStock)bizBill.GetOne(new Guid(paramId));
            if (billStock == null)
            {
                throw new Exception("没有找到对应的单据,可能是传入参数有误");
            }

        }
        switch (billStock.StockActivityType)
        {
            case StockActivityType.Export: lblBillTitle.Text = "出库单"; break;
            case StockActivityType.Import: lblBillTitle.Text = "入库单"; break;
        }

        if (!IsPostBack)
        {
            BindReson();
            LoadForm();
        }
    }