Exemple #1
0
        private void BindLocation()
        {
            BindDropdownDAL obj     = new BindDropdownDAL();
            var             FrmCity = obj.BindLocFrom();

            ddlFromCity.DataSource     = FrmCity;
            ddlFromCity.DataTextField  = "City_Name";
            ddlFromCity.DataValueField = "City_Idno";
            ddlFromCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));
            ddlFromCity.DataBind();
        }
        private void BindLocation()
        {
            BindDropdownDAL obj = new BindDropdownDAL();
            var             lst = obj.BindLocFrom();

            obj = null;
            ddlLocation.DataSource     = lst;
            ddlLocation.DataTextField  = "City_Name";
            ddlLocation.DataValueField = "City_Idno";
            ddlLocation.DataBind();
        }
Exemple #3
0
        protected void ImgBtnLocation_Click(object sender, ImageClickEventArgs e)
        {
            BindDropdownDAL obj = new BindDropdownDAL();
            var             to  = obj.BindLocFrom();

            ddlLocation.DataSource     = to;
            ddlLocation.DataTextField  = "city_name";
            ddlLocation.DataValueField = "city_idno";
            ddlLocation.DataBind();
            ddlLocation.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));
        }
        private void BindLocation()
        {
            BindDropdownDAL obj = new BindDropdownDAL();
            var             to  = obj.BindLocFrom();

            ddlLocation.DataSource     = to;
            ddlLocation.DataTextField  = "city_name";
            ddlLocation.DataValueField = "city_idno";
            ddlLocation.DataBind();
            ddlLocation.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));
        }
        private void BindFromCity()
        {
            BindDropdownDAL obj = new BindDropdownDAL();
            var             lst = obj.BindLocFrom();

            obj = null;
            drpCityFrom.DataSource     = lst;
            drpCityFrom.DataTextField  = "City_Name";
            drpCityFrom.DataValueField = "City_Idno";
            drpCityFrom.DataBind();
            drpCityFrom.Items.Insert(0, new ListItem("--Select--", "0"));
        }
Exemple #6
0
        private void BindCity()
        {
            BindDropdownDAL obj    = new BindDropdownDAL();
            var             ToCity = obj.BindLocFrom();

            obj = null;
            ddlFromCity.DataSource     = ToCity;
            ddlFromCity.DataTextField  = "city_name";
            ddlFromCity.DataValueField = "city_idno";
            ddlFromCity.DataBind();
            ddlFromCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Choose Location...", "0"));
        }
Exemple #7
0
        private void BindCity(Int64 UserIdno)
        {
            BindDropdownDAL obj = new BindDropdownDAL();
            var             lst = obj.BindLocFrom();

            obj = null;
            ddlLocation.DataSource     = lst;
            ddlLocation.DataTextField  = "City_Name";
            ddlLocation.DataValueField = "City_Idno";
            ddlLocation.DataBind();
            ddlLocation.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));
        }
        private void BindCity()
        {
            BindDropdownDAL obj    = new BindDropdownDAL();
            var             ToFrom = obj.BindLocFrom();

            DdlfromcityHead.DataSource     = ToFrom;
            DdlfromcityHead.DataTextField  = "City_Name";
            DdlfromcityHead.DataValueField = "City_Idno";
            DdlfromcityHead.DataBind();
            obj = null;
            DdlfromcityHead.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));
        }
        private void BindCity()
        {
            BindDropdownDAL obj = new BindDropdownDAL();
            var             lst = obj.BindLocFrom();

            if (lst.Count > 0)
            {
                ddlFromCity.DataSource     = lst;
                ddlFromCity.DataTextField  = "City_Name";
                ddlFromCity.DataValueField = "City_Idno";
                ddlFromCity.DataBind();
                ddlFromCity.Items.Insert(0, new ListItem("--Select--", "0"));
            }
        }
Exemple #10
0
        private void BindDropdown()
        {
            BindDropdownDAL obj         = new BindDropdownDAL();
            var             senderLst   = obj.BindSender();
            var             receiverLst = obj.BindSender();
            var             TruckNolst  = obj.BindTruckNowithLastDigit();
            var             ToCity      = obj.BindAllToCity();
            var             Agent       = obj.BindAgent();
            var             bank        = obj.BindBank();
            var             UnitName    = obj.BindUnitName();
            var             ToCityComp  = obj.BindLocFrom();

            obj = null;

            ddlSender.DataSource     = senderLst;
            ddlSender.DataTextField  = "Acnt_Name";
            ddlSender.DataValueField = "Acnt_Idno";
            ddlSender.DataBind();
            ddlSender.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));

            ddlTruckNo.DataSource     = TruckNolst;
            ddlTruckNo.DataTextField  = "Lorry_No";
            ddlTruckNo.DataValueField = "Lorry_Idno";
            ddlTruckNo.DataBind();
            ddlTruckNo.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));

            ddlFromCity.DataSource     = ToCity;
            ddlFromCity.DataTextField  = "city_name";
            ddlFromCity.DataValueField = "city_idno";
            ddlFromCity.DataBind();
            ddlFromCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));

            ddlToCity.DataSource     = ToCity;
            ddlToCity.DataTextField  = "city_name";
            ddlToCity.DataValueField = "city_idno";
            ddlToCity.DataBind();
            ddlToCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));

            ddlCompFromCity.DataSource     = ToCity;
            ddlCompFromCity.DataTextField  = "city_name";
            ddlCompFromCity.DataValueField = "city_idno";
            ddlCompFromCity.DataBind();
            ddlCompFromCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));

            ddlCompFromCity.DataSource     = ToCityComp;
            ddlCompFromCity.DataTextField  = "City_Name";
            ddlCompFromCity.DataValueField = "City_Idno";
            ddlCompFromCity.DataBind();
            ddlCompFromCity.Items.Insert(0, new ListItem("--Select--", "0"));
        }
Exemple #11
0
        private void BindDropdown()
        {
            BindDropdownDAL obj        = new BindDropdownDAL();
            TyreIssueDAL    objTruck   = new TyreIssueDAL();
            var             TruckNolst = obj.BindTruckNo();
            var             ToCity     = obj.BindLocFrom();
            var             itemname   = objTruck.BindItemName();

            obj = null;
            ddlTruckNo.DataSource     = objTruck.BindTruckNo();
            ddlTruckNo.DataTextField  = "Lorry_No";
            ddlTruckNo.DataValueField = "Lorry_Idno";
            ddlTruckNo.DataBind();
            ddlTruckNo.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));
        }
        public void BindLocation()
        {
            BindDropdownDAL obj = new BindDropdownDAL();
            var             lst = obj.BindLocFrom();

            ddlIssLoc.DataSource     = lst;
            ddlIssLoc.DataTextField  = "City_Name";
            ddlIssLoc.DataValueField = "City_Idno";
            ddlIssLoc.DataBind();
            ddlIssLoc.Items.Insert(0, new ListItem("--Select--", "0"));

            obj = null;
            ddlRecLoc.DataSource     = lst;
            ddlRecLoc.DataTextField  = "City_Name";
            ddlRecLoc.DataValueField = "City_Idno";
            ddlRecLoc.DataBind();
            ddlRecLoc.Items.Insert(0, new ListItem("--Select--", "0"));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.UrlReferrer == null)
            {
                base.AutoRedirect();
            }
            if (!Page.IsPostBack)
            {
                //if (base.CheckUserRights(intFormId) == false)
                //{
                //    Response.Redirect("PermissionDenied.aspx");
                //}
                //if (base.ADD == false)
                //{
                //    lnkbtnSave.Visible = false;
                //}
                //if (base.View == false)
                //{
                //    lblViewList.Visible = false;
                //}

                txtDate.Text = ApplicationFunction.GetIndianDateTime().Date.ToString("dd-MM-yyyy");
                this.BindCity();
                if (Convert.ToString(Session["Userclass"]) == "Admin")
                {
                    BindDropdownDAL obj = new BindDropdownDAL();
                    var             lst = obj.BindLocFrom();
                    drpBaseCity.DataSource     = lst;
                    drpBaseCity.DataTextField  = "City_Name";
                    drpBaseCity.DataValueField = "City_Idno";
                    drpBaseCity.DataBind();
                    drpBaseCity.Items.Insert(0, new ListItem("--Select--", "0"));

                    drpDeliveryPlace.DataSource     = lst;
                    drpDeliveryPlace.DataTextField  = "City_Name";
                    drpDeliveryPlace.DataValueField = "City_Idno";
                    drpDeliveryPlace.DataBind();
                    drpDeliveryPlace.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));
                }
                else
                {
                    this.BindCity(Convert.ToInt64(Session["UserIdno"]));
                }
                drpBaseCity.SelectedValue = Convert.ToString(base.UserFromCity);

                this.BindDateRange(); this.BindItemType();
                ddlDateRange.SelectedValue = Convert.ToString(base.UserDateRng);
                Int32 intYearIdno = Convert.ToInt32(ddlDateRange.SelectedValue);
                ddlDateRange_SelectedIndexChanged(null, null);
                ddlDateRange.SelectedIndex = 0;
                StockTransferDAL objstck = new StockTransferDAL();
                if (drpBaseCity.SelectedIndex > 0)
                {
                    txtIssueNo.Text = Convert.ToString(objstck.SelectMaxNo(Convert.ToInt32(ddlDateRange.SelectedValue), Convert.ToInt32(drpBaseCity.SelectedValue)));
                }
                if (Request.QueryString["q"] != null)
                {
                    Populate(Convert.ToInt64(Request.QueryString["q"]));
                    hidStckid.Value = Convert.ToString(Request.QueryString["q"]);
                    //btnNew.Visible = true;
                    imgPrint.Visible     = true;
                    lnkbtnAdd.Visible    = true;
                    ddlDateRange.Enabled = false;
                }

                else
                {
                    lnkbtnAdd.Visible    = false;
                    ddlDateRange.Enabled = true;
                    imgPrint.Visible     = false;
                }
                txtQty.Text = "1";
                txtRate.Attributes.Add("onkeypress", "return allowOnlyFloatNumber(event);");
                txtQty.Attributes.Add("onkeypress", "return allowOnlyFloatNumber(event);");
                txtDate.Attributes.Add("onkeypress", "return notAllowAnything(event);");
                txtRemark.Attributes.Add("onkeypress", "return notAllowSpecialCharacters_Spaceallow(event);");
                txtNetAmnt.Attributes.Add("onkeypress", "return allowOnlyFloatNumber(event);");
            }
        }