示例#1
0
    protected void lbtnDelete_Click(object sender, EventArgs e)
    {
        string id = ((LinkButton)sender).CommandArgument;

        try
        {
            TheProductLineUserMgr.DeleteProductLineUser(Int32.Parse(id));
            ShowSuccessMessage("Mes.ProductLineUser.Delete.Successfully");
            UpdateView();
        }
        catch (Castle.Facilities.NHibernateIntegration.DataException ex)
        {
            ShowErrorMessage("Mes.ProductLineUser.Delete.Fail");
        }
    }
示例#2
0
    protected void ToInBT_Click(object sender, EventArgs e)
    {
        List <Flow> pList = new List <Flow>();

        foreach (ListItem item in this.CBL_NotInProductLine.Items)
        {
            if (item.Selected)
            {
                ProductLineUser pu = new ProductLineUser();
                pu.DeliveryUser = TheUserMgr.LoadUser(this.tbUser.Text.Trim());
                pu.ProductLine  = TheFlowMgr.LoadFlow(item.Value);
                TheProductLineUserMgr.CreateProductLineUser(pu);
            }
        }

        this.CBL_NotInProductLine.DataBind();
        this.CBL_InProductLine.DataBind();
        this.cb_InProductLine.Checked    = false;
        this.cb_NotInProductLine.Checked = false;
    }
示例#3
0
    protected void ToOutBT_Click(object sender, EventArgs e)
    {
        List <ProductLineUser> upList = new List <ProductLineUser>();

        foreach (ListItem item in this.CBL_InProductLine.Items)
        {
            if (item.Selected)
            {
                ProductLineUser userProductLine = TheProductLineUserMgr.LoadProductLineUser(this.tbUser.Text.Trim(), item.Value);
                upList.Add(userProductLine);
            }
        }
        if (upList.Count > 0)
        {
            TheProductLineUserMgr.DeleteProductLineUser(upList);
        }
        this.CBL_NotInProductLine.DataBind();
        this.CBL_InProductLine.DataBind();
        this.cb_InProductLine.Checked    = false;
        this.cb_NotInProductLine.Checked = false;
    }