Exemplo n.º 1
0
    protected void lbDelete_Click(object sender, EventArgs e)
    {
        LinkButton linkButton = new LinkButton();

        linkButton = (LinkButton)sender;
        bool result = LOCATIONMAPPINGManager.DeleteLOCATIONMAPPING(Convert.ToInt32(linkButton.CommandArgument));

        showLOCATIONMAPPINGGrid();
    }
Exemplo n.º 2
0
    private void showLOCATIONMAPPINGData()
    {
        LOCATIONMAPPING lOCATIONMAPPING = new LOCATIONMAPPING();

        lOCATIONMAPPING = LOCATIONMAPPINGManager.GetLOCATIONMAPPINGByID(Int32.Parse(Request.QueryString["lOCATIONMAPPINGID"]));

        ddlLOCATION.SelectedValue      = lOCATIONMAPPING.LOCATIONID.ToString();
        ddlLOCATIONGROUP.SelectedValue = lOCATIONMAPPING.LOCATIONGROUPID.ToString();
    }
Exemplo n.º 3
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        LOCATIONMAPPING lOCATIONMAPPING = new LOCATIONMAPPING();

        lOCATIONMAPPING.ADDEDDATE       = DateTime.Now;
        lOCATIONMAPPING.LOCATIONID      = Int32.Parse(ddlLOCATION.SelectedValue);
        lOCATIONMAPPING.LOCATIONGROUPID = Int32.Parse(ddlLOCATIONGROUP.SelectedValue);
        int resutl = LOCATIONMAPPINGManager.InsertLOCATIONMAPPING(lOCATIONMAPPING);

        //Response.Redirect("AdminLOCATIONMAPPINGDisplay.aspx");
        showLOCATIONMAPPINGGrid();
        btnClear_Click(this, new EventArgs());
    }
Exemplo n.º 4
0
    protected void GetlocationInfo()
    {
        LOCATION lOCATION = new LOCATION();

        lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(ddlLoction.SelectedItem.Value.ToString()));
        if (lOCATION != null)
        {
            txtCountry.Text = lOCATION.COUNTRY.ToString();
            txtCity.Text    = lOCATION.CITY.ToString();
            txtBranch.Text  = lOCATION.BRANCH.ToString();
            loadFoodItem(LOCATIONMAPPINGManager.GetLOCATIONMAPPINGByLOCATIONID(int.Parse(ddlLoction.SelectedItem.Value.ToString()))[0].LOCATIONGROUPID);
        }
    }
Exemplo n.º 5
0
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        LOCATIONMAPPING lOCATIONMAPPING = new LOCATIONMAPPING();

        lOCATIONMAPPING = LOCATIONMAPPINGManager.GetLOCATIONMAPPINGByID(Int32.Parse(Request.QueryString["lOCATIONMAPPINGID"]));
        LOCATIONMAPPING tempLOCATIONMAPPING = new LOCATIONMAPPING();

        tempLOCATIONMAPPING.LOCATIONMAPPINGID = lOCATIONMAPPING.LOCATIONMAPPINGID;

        tempLOCATIONMAPPING.ADDEDDATE       = DateTime.Now;
        tempLOCATIONMAPPING.LOCATIONID      = Int32.Parse(ddlLOCATION.SelectedValue);
        tempLOCATIONMAPPING.LOCATIONGROUPID = Int32.Parse(ddlLOCATIONGROUP.SelectedValue);
        bool result = LOCATIONMAPPINGManager.UpdateLOCATIONMAPPING(tempLOCATIONMAPPING);

        Response.Redirect("AdminLOCATIONMAPPINGDisplay.aspx");
    }
Exemplo n.º 6
0
    private void showLOCATIONMAPPINGGrid()
    {
        gvLOCATIONMAPPING.DataSource = LOCATIONMAPPINGManager.GetAllLOCATIONMAPPINGs();
        gvLOCATIONMAPPING.DataBind();
        foreach (GridViewRow gvr in gvLOCATIONMAPPING.Rows)
        {
            Label lblLOCATIONID      = gvr.FindControl("lblLOCATIONID") as Label;
            Label lblLOCATIONGROUPID = gvr.FindControl("lblLOCATIONGROUPID") as Label;

            LOCATION location = LOCATIONManager.GetLOCATIONByID(int.Parse(lblLOCATIONID.Text));
            if (location != null)
            {
                lblLOCATIONID.Text = location.COUNTRY + ", " + location.CITY + ", " + location.BRANCH;
            }

            LOCATIONGROUP locationGroup = LOCATIONGROUPManager.GetLOCATIONGROUPByID(int.Parse(lblLOCATIONGROUPID.Text));
            if (locationGroup != null)
            {
                lblLOCATIONGROUPID.Text = locationGroup.GROUPNAME;
            }
        }
    }
Exemplo n.º 7
0
    protected void GetlocationInfo()
    {
        LOCATION lOCATION = new LOCATION();

        lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(ddlLoction.SelectedItem.Value.ToString()));
        if (lOCATION != null)
        {
            txtCountry.Text = lOCATION.COUNTRY.ToString();
            txtCity.Text    = lOCATION.CITY.ToString();
            txtBranch.Text  = lOCATION.BRANCH.ToString();


            //if (txtCity.Text == "GUI-FOOD")
            //{
            loadFoodItem(LOCATIONMAPPINGManager.GetLOCATIONMAPPINGByLOCATIONID(int.Parse(ddlLoction.SelectedItem.Value.ToString()))[0].LOCATIONGROUPID);
            //}
            //else
            //{
            //    loadFoodItem(1);
            //}

            Session["snFoodlocationID"] = ddlLoction.SelectedItem.Value.ToString();
        }
    }