예제 #1
0
    /// <summary>
    /// 国家与仓库联动
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Country1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataView dataev = new DataView(BillOutOrderBLL.GetWareHouseName());

        //UserControl_Country cou = Page.FindControl("Country1") as UserControl_Country;
        dataev.RowFilter            = "[CountryCode]=" + Convert.ToInt32(this.DropDownList1.SelectedValue);
        ddlWareHouse.DataSource     = dataev;
        ddlWareHouse.DataTextField  = "WareHouseName";
        ddlWareHouse.DataValueField = "WareHouseID";
        ddlWareHouse.DataBind();
        if (string.IsNullOrEmpty(ddlWareHouse.SelectedValue))
        {
            //ddlkuwei.DataSource = AddReportProfit.GetProductWareHouseInfo();
            //ddlkuwei.DataTextField = "name";
            //ddlkuwei.DataValueField = "id";
            //ddlkuwei.DataBind();
            //ddlkuwei.Enabled = false;
            //ddlcangku.Enabled = false;
            ddlWareHouse.Items.Add(new ListItem(GetTran("000592", "无仓库"), "-2"));
            ViewState["Ekuc"] = "false";
        }
        else
        {
            ViewState["Ekuc"] = "true";
        }
        ddlWareHouse_SelectedIndexChanged(null, null);
    }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Permissions.ComRedirect(Page, Permissions.redirUrl);
     Response.Cache.SetExpires(DateTime.Now);
     Permissions.CheckManagePermission(EnumCompanyPermission.StorageAddReWareHouse);
     if (!Common.WPermission(Session["Company"].ToString()))
     {
         visdiv.Visible = false;
         Response.Write(Common.ReturnAlert("该管理员没有仓库权限!!"));
         return;
     }
     visdiv.Visible = true;
     if (!IsPostBack)
     {
         CountryModel mode   = CountryBLL.GetCountryModels()[0];
         DataView     dataev = new DataView(BillOutOrderBLL.GetWareHouseName());
         dataev.RowFilter         = "[CountryCode]=" + CountryBLL.GetCountryByCode(mode.ID);
         ddlcangku.DataSource     = dataev;
         ddlcangku.DataTextField  = "WareHouseName";
         ddlcangku.DataValueField = "WareHouseID";
         ddlcangku.DataBind();
         if (string.IsNullOrEmpty(ddlcangku.SelectedValue))
         {
             ViewState["Ekuc"] = "false";
         }
         else
         {
             ViewState["Ekuc"] = "true";
         }
         ddlcangku_SelectedIndexChanged(null, null);
         BtnConfirm_Click(null, null);
     }
     Translations();
 }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.StorageBrowseBills);
        if (!Common.WPermission(Session["Company"].ToString()))
        {
            vistable.Visible  = false;
            vistable1.Visible = false;
            Response.Write(Common.ReturnAlert("该管理员没有仓库权限!!"));
            return;
        }
        vistable.Visible  = true;
        vistable1.Visible = true;
        if (!IsPostBack)
        {
            //绑定单据类型
            ddltype.DataSource     = DocTypeTableDAL.GetDocTypeTableInfo();
            ddltype.DataTextField  = "DocTypeName";
            ddltype.DataValueField = "DocTypeID";
            ddltype.DataBind();

            CountryModel mode   = CountryBLL.GetCountryModels()[0];
            DataView     dataev = new DataView(BillOutOrderBLL.GetWareHouseName());
            dataev.RowFilter         = "[CountryCode]=" + CountryBLL.GetCountryByCode(mode.ID);
            ddlcangku.DataSource     = dataev;
            ddlcangku.DataTextField  = "WareHouseName";
            ddlcangku.DataValueField = "WareHouseID";
            ddlcangku.DataBind();
            if (string.IsNullOrEmpty(ddlcangku.SelectedValue))
            {
                ViewState["Ekuc"] = "false";
            }
            else
            {
                ViewState["Ekuc"] = "true";
            }
            ddlcangku_SelectedIndexChanged(null, null);

            btnSeach_Click(null, null);

            this.txtshenheren.Text = GetTran("000881", "不限");
            this.txtkaichuren.Text = GetTran("000881", "不限");

            Translations();
        }
    }
예제 #4
0
    /// <summary>
    /// 国家与仓库联动
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Country1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataView            dataev = new DataView(BillOutOrderBLL.GetWareHouseName());
        UserControl_Country cou    = Page.FindControl("Country1") as UserControl_Country;

        dataev.RowFilter         = "[CountryCode]='" + CountryBLL.GetCountryByCode(cou.CID) + "'";
        ddlcangku.DataSource     = dataev;
        ddlcangku.DataTextField  = "WareHouseName";
        ddlcangku.DataValueField = "WareHouseID";
        ddlcangku.DataBind();
        if (string.IsNullOrEmpty(ddlcangku.SelectedValue))
        {
            ddlcangku.Items.Add(new ListItem(GetTran("000592", "无仓库"), "-1"));
            ViewState["Ekuc"] = "false";
        }
        else
        {
            ViewState["Ekuc"] = "true";
        }
        ddlcangku_SelectedIndexChanged(null, null);
    }
예제 #5
0
    /// <summary>
    /// 国家与仓库联动
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Country1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataView dataev = new DataView(BillOutOrderBLL.GetWareHouseName());

        dataev.RowFilter            = "[CountryCode]=" + Convert.ToInt32(this.DropDownList1.SelectedValue);
        ddlWareHouse.DataSource     = dataev;
        ddlWareHouse.DataTextField  = "WareHouseName";
        ddlWareHouse.DataValueField = "WareHouseID";
        ddlWareHouse.DataBind();
        Translations();
        if (string.IsNullOrEmpty(ddlWareHouse.SelectedValue))
        {
            ddlWareHouse.Items.Add(new ListItem(GetTran("000592", "无仓库"), "-2"));
            ViewState["Ekuc"] = "false";
        }
        else
        {
            ViewState["Ekuc"] = "true";
        }
        ddlWareHouse_SelectedIndexChanged(null, null);
    }
예제 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        if (!IsPostBack)
        {
            Response.Cache.SetExpires(DateTime.Now);
            Permissions.CheckManagePermission(EnumCompanyPermission.StorageAddReWareHouse);

            this.DropCurrery.DataSource     = CountryBLL.GetCountryModels();
            this.DropCurrery.DataTextField  = "name";
            this.DropCurrery.DataValueField = "countrycode";
            this.DropCurrery.DataBind();

            int cID = Convert.ToInt32(DropCurrery.SelectedItem.Value);

            //绑定入库仓库
            //this.ddlinwareHouse.DataSource = BillOutOrderBLL.GetWareHouseName();

            CountryModel mode   = CountryBLL.GetCountryModels()[0];
            DataView     dataev = new DataView(BillOutOrderBLL.GetWareHouseName());
            dataev.RowFilter                   = "[CountryCode]=" + CountryBLL.GetCountryByCode(mode.ID);
            ddlinwareHouse.DataSource          = dataev;
            this.ddlinwareHouse.DataTextField  = "WareHouseName";
            this.ddlinwareHouse.DataValueField = "WareHouseID";
            this.ddlinwareHouse.DataBind();
            if (string.IsNullOrEmpty(ddlinwareHouse.SelectedValue))
            {
                ddlinwareHouse.DataSource     = AddReportProfit.GetProductWareHouseInfo();
                ddlinwareHouse.DataTextField  = "name";
                ddlinwareHouse.DataValueField = "id";
                ddlinwareHouse.DataBind();
                ddlinwareHouse.Enabled    = false;
                ddlintDepotSeatID.Enabled = false;
                ViewState["Ekuc"]         = "false";
            }
            //绑定出库仓库
            //this.ddloutWareHouse.DataSource = BillOutOrderBLL.GetWareHouseName();

            DataView dataev1 = new DataView(BillOutOrderBLL.GetWareHouseName());
            dataev1.RowFilter                   = "[CountryCode]=" + CountryBLL.GetCountryByCode(mode.ID);
            ddloutWareHouse.DataSource          = dataev1;
            this.ddloutWareHouse.DataTextField  = "WareHouseName";
            this.ddloutWareHouse.DataValueField = "WareHouseID";
            this.ddloutWareHouse.DataBind();
            if (string.IsNullOrEmpty(ddloutWareHouse.SelectedValue))
            {
                ddloutWareHouse.DataSource     = AddReportProfit.GetProductWareHouseInfo();
                ddloutWareHouse.DataTextField  = "name";
                ddloutWareHouse.DataValueField = "id";
                ddloutWareHouse.DataBind();
                ddloutWareHouse.Enabled   = false;
                ddloutDepotSeatID.Enabled = false;
                ViewState["Ekuc"]         = "false";
            }
            else
            {
                ViewState["Ekuc"] = "true";
            }
            ddloutWareHouse_SelectedIndexChanged(null, null);
            ddlinwareHouse_SelectedIndexChanged(null, null);
            //绑定产品列表
            gridBind(cID, Convert.ToInt32(ddloutWareHouse.SelectedValue), Convert.ToInt32(ddloutDepotSeatID.SelectedValue));
        }
        Translations();
    }