Exemplo n.º 1
0
    protected void gvProject_SelectedIndexChanging(object sender, GridViewSelectEventArgs se)
    {
        ucCustomPagerItems.isCountRecord = 1;
        gvProject.SelectedIndex          = se.NewSelectedIndex;

        ViewState["ProjectID"] = ((Label)gvProject.Rows[se.NewSelectedIndex].FindControl("lblProjectID")).Text;

        ViewState["ModuleID"] = null;
        ViewState["ScreenID"] = null;

        BindProjects();
        BindModules();
        BindScreen();

        ClearModuleFields();
        ClearScreenFields();
        this.SetFocus("txtModule");

        UpdProjectGrid.Update();
        UpdProjectEntry.Update();

        UpdModuleGrid.Update();
        UpdModuleEntry.Update();

        UpdScreenGrid.Update();
        UpdScreenEntry.Update();
    }
Exemplo n.º 2
0
    protected void btnModuleSave_Click(object sender, EventArgs e)
    {
        int retval = BLL_Infra_ShipSettings.Ins_Upd_Nav_Modules(UDFLib.ConvertIntegerToNull(ViewState["ModuleID"]), Convert.ToInt32(ViewState["ProjectID"].ToString())
                                                                , Convert.ToInt32(ddlModuleScreen.SelectedValue.ToString()), txtModule.Text, txtModuleImagePath.Text, null, Convert.ToInt32(Session["USERID"].ToString()));

        BindModules();
        UpdModuleGrid.Update();
    }
Exemplo n.º 3
0
    protected void imgModuleSearch_Click(object sender, ImageClickEventArgs e)
    {
        BindModules();
        ClearModuleFields();



        UpdModuleGrid.Update();
        UpdModuleEntry.Update();
    }
Exemplo n.º 4
0
    protected void ImgDefaultModule_Click(object sender, CommandEventArgs e)
    {
        int retval = BLL_Infra_ShipSettings.Default_Nav_Module(Convert.ToInt32(e.CommandArgument.ToString()), Convert.ToInt32(Convert.ToInt32(Session["userid"].ToString())));

        BindModules();

        ClearModuleFields();

        UpdModuleGrid.Update();
        UpdModuleEntry.Update();
    }
Exemplo n.º 5
0
    protected void imgProjectSearch_Click(object sender, ImageClickEventArgs e)
    {
        BindProjects();

        BindEmptyModule();


        ClearProjectFields();
        ClearModuleFields();

        UpdProjectGrid.Update();
        UpdProjectEntry.Update();

        UpdModuleGrid.Update();
        UpdModuleEntry.Update();
    }
Exemplo n.º 6
0
    protected void ImgProjectDelete_Click(object sender, CommandEventArgs e)
    {
        int retval = BLL_Infra_ShipSettings.Delete_Nav_Projects(Convert.ToInt32(e.CommandArgument.ToString()), Convert.ToInt32(Convert.ToInt32(Session["userid"].ToString())));

        BindProjects();
        BindEmptyModule();

        ClearProjectFields();
        ClearModuleFields();

        UpdProjectGrid.Update();
        UpdProjectEntry.Update();

        UpdModuleGrid.Update();
        UpdModuleEntry.Update();
    }
Exemplo n.º 7
0
    protected void ImgModuleDelete_Click(object sender, CommandEventArgs e)
    {
        int retval = BLL_Infra_ShipSettings.Delete_Modules(Convert.ToInt32(e.CommandArgument.ToString()), Convert.ToInt32(Convert.ToInt32(Session["userid"].ToString())));

        BindModules();


        BindEmptyScreen();

        ClearModuleFields();
        ClearScreenFields();

        UpdModuleGrid.Update();
        UpdModuleEntry.Update();

        UpdScreenGrid.Update();
        UpdScreenEntry.Update();
    }
Exemplo n.º 8
0
    public void BindModules()
    {
        int?Project_ID = null;

        if (ViewState["ProjectID"] != null)
        {
            Project_ID = Convert.ToInt32(ViewState["ProjectID"].ToString());
        }

        string sortbycoloumn = (ViewState["MODULESORTBYCOLOUMN"] == null) ? null : (ViewState["MODULESORTBYCOLOUMN"].ToString());
        int?   sortdirection = null;

        if (ViewState["MODULESORTDIRECTION"] != null)
        {
            sortdirection = Int32.Parse(ViewState["MODULESORTDIRECTION"].ToString());
        }

        DataTable dt = BLL_Infra_ShipSettings.Get_Nav_Module_Search(txtSearchModule.Text, Project_ID, sortbycoloumn, sortdirection);

        if (dt.Rows.Count > 0)
        {
            gvModule.DataSource = dt;
            gvModule.DataBind();

            if (ViewState["ModuleID"] == null)
            {
                ViewState["ModuleID"] = dt.Rows[0]["Module_ID"].ToString();

                BindModuleList(Convert.ToInt32(ViewState["ModuleID"].ToString()));

                gvModule.SelectedIndex = 0;
            }
            SetModuleRowSelection();
        }
        else
        {
            gvModule.DataSource = dt;
            gvModule.DataBind();
            ViewState["ModuleID"] = null;
        }

        UpdModuleGrid.Update();
    }