コード例 #1
0
    protected void btnRestoreSelected_Click(object sender, CommandEventArgs e)
    {
        int       Msg = 0;
        DataTable dt  = ObjGroupMaster.GetGroupMasterFalseAllData(StrCompId);

        if (GvGroupBin.Rows.Count != 0)
        {
            if (lblSelectedRecord.Text != "")
            {
                for (int j = 0; j < lblSelectedRecord.Text.Split(',').Length; j++)
                {
                    if (lblSelectedRecord.Text.Split(',')[j] != "")
                    {
                        Msg = ObjGroupMaster.DeleteGroupMaster(StrCompId, lblSelectedRecord.Text.Split(',')[j].Trim().ToString(), true.ToString(), Session["UserId"].ToString(), DateTime.Now.ToString());
                        if (Msg != 0)
                        {
                            ObjGroupMaster.UpdateParentId(StrCompId, lblSelectedRecord.Text.Split(',')[j].Trim().ToString().ToString());
                        }
                    }
                }
            }

            if (Msg != 0)
            {
                btnRefreshBin_Click(null, null);
                lblSelectedRecord.Text = "";
                DisplayMessage("Record Activate");
                System.Web.UI.ScriptManager.GetCurrent(this).SetFocus(txtValue);
            }
            else
            {
                int fleg = 0;
                foreach (GridViewRow Gvr in GvGroupBin.Rows)
                {
                    CheckBox chk = (CheckBox)Gvr.FindControl("chkSelect");
                    if (chk.Checked)
                    {
                        fleg = 1;
                    }
                    else
                    {
                        fleg = 0;
                    }
                }
                if (fleg == 0)
                {
                    DisplayMessage("Please Select Record");
                }
                else
                {
                    DisplayMessage("Record Not Activated");
                }
            }
        }
        System.Web.UI.ScriptManager.GetCurrent(this).SetFocus(txtValueBin);
    }
コード例 #2
0
    protected void btnRestoreSelected_Click(object sender, CommandEventArgs e)
    {
        int       Msg = 0;
        DataTable dt  = ObjRackMaster.GetRackMasterFalseAll(StrCompId, StrBrandId, strLocationId);

        if (gvRackMasterBin.Rows.Count != 0)
        {
            if (lblSelectedRecord.Text != "")
            {
                for (int j = 0; j < lblSelectedRecord.Text.Split(',').Length; j++)
                {
                    if (lblSelectedRecord.Text.Split(',')[j] != "")
                    {
                        Msg = ObjRackMaster.DeleteRackMaster(StrCompId, StrBrandId, strLocationId, lblSelectedRecord.Text.Split(',')[j].Trim().ToString(), true.ToString(), Session["UserId"].ToString(), DateTime.Now.ToString());
                        if (Msg != 0)
                        {
                            ObjRackMaster.UpdateParentId(StrCompId, StrBrandId, strLocationId, lblSelectedRecord.Text.Split(',')[j].Trim().ToString().ToString());
                        }
                    }
                }
            }

            if (Msg != 0)
            {
                lblSelectedRecord.Text = "";
                DisplayMessage("Record Activated");
                btnRefreshBin_Click(null, null);
            }
            else
            {
                int fleg = 0;
                foreach (GridViewRow Gvr in gvRackMasterBin.Rows)
                {
                    CheckBox chk = (CheckBox)Gvr.FindControl("chkSelect");
                    if (chk.Checked)
                    {
                        fleg = 1;
                    }
                    else
                    {
                        fleg = 0;
                    }
                }
                if (fleg == 0)
                {
                    DisplayMessage("Please Select Record");
                }
                else
                {
                    DisplayMessage("Record Not Activated");
                }
            }
        }
        txtValueBin.Focus();
    }
コード例 #3
0
    protected void btnRestoreSelected_Click(object sender, CommandEventArgs e)
    {
        int       b  = 0;
        DataTable dt = objCurr.GetCurrencyMasterInactive();

        if (GvCurrencyBin.Rows.Count != 0)
        {
            if (lblSelectedRecord.Text != "")
            {
                for (int j = 0; j < lblSelectedRecord.Text.Split(',').Length; j++)
                {
                    if (lblSelectedRecord.Text.Split(',')[j] != "")
                    {
                        //Msg = objTax.DeleteTaxMaster(lblSelectedRecord.Text.Split(',')[j].Trim().ToString(), true.ToString(), Session["UserId"].ToString(), DateTime.Now.ToString());
                        b = objCurr.DeleteCurrencyMaster(lblSelectedRecord.Text.Split(',')[j].Trim().ToString(), true.ToString(), Session["UserId"].ToString(), DateTime.Now.ToString());
                    }
                }
            }

            if (b != 0)
            {
                FillGrid();
                FillGridBin();

                lblSelectedRecord.Text = "";
                DisplayMessage("Record Activate");
            }
            else
            {
                int fleg = 0;
                foreach (GridViewRow Gvr in GvCurrencyBin.Rows)
                {
                    CheckBox chk = (CheckBox)Gvr.FindControl("chkSelect");
                    if (chk.Checked)
                    {
                        fleg = 1;
                    }
                    else
                    {
                        fleg = 0;
                    }
                }
                if (fleg == 0)
                {
                    DisplayMessage("Please Select Record");
                }
                else
                {
                    DisplayMessage("Record Not Activated");
                }
            }
        }
        System.Web.UI.ScriptManager.GetCurrent(this).SetFocus(txtValueBin);
    }
コード例 #4
0
    protected void btnRestoreSelected_Click(object sender, ImageClickEventArgs e)
    {
        int       Msg = 0;
        DataTable dt  = objOptionCategory.GetAddressCategoryFalseAll(StrCompId.ToString());

        if (GvOptionCategoryBin.Rows.Count != 0)
        {
            if (lblSelectedRecord.Text != "")
            {
                for (int j = 0; j < lblSelectedRecord.Text.Split(',').Length; j++)
                {
                    if (lblSelectedRecord.Text.Split(',')[j] != "")
                    {
                        Msg = objOptionCategory.DeleteOptionCategory(StrCompId.ToString(), lblSelectedRecord.Text.Split(',')[j].Trim().ToString(), true.ToString(), Session["UserId"].ToString(), DateTime.Now.ToString());
                    }
                }
            }

            if (Msg != 0)
            {
                FillGrid();
                FillGridBin();
                ViewState["Select"]    = null;
                lblSelectedRecord.Text = "";
                DisplayMessage("Record Activated");
                btnRefreshBin_Click(null, null);
            }
            else
            {
                int fleg = 0;
                foreach (GridViewRow Gvr in GvOptionCategoryBin.Rows)
                {
                    CheckBox chk = (CheckBox)Gvr.FindControl("chkgvSelect");
                    if (chk.Checked)
                    {
                        fleg = 1;
                    }
                    else
                    {
                        fleg = 0;
                    }
                }
                if (fleg == 0)
                {
                    DisplayMessage("Please Select Record");
                }
                else
                {
                    DisplayMessage("Record Not Activated");
                }
            }
        }
        txtValueBin.Focus();
    }
コード例 #5
0
    protected void btnRestoreSelected_Click(object sender, EventArgs e)
    {
        int       Msg = 0;
        DataTable dt  = objDesg.GetExaminationMasterInactive(Session["CompId"].ToString().ToString());

        if (GvExaminationBin.Rows.Count != 0)
        {
            if (lblSelectedRecord.Text != "")
            {
                for (int j = 0; j < lblSelectedRecord.Text.Split(',').Length; j++)
                {
                    if (lblSelectedRecord.Text.Split(',')[j] != "")
                    {
                        Msg = objDesg.DeleteExaminationMaster(Session["CompId"].ToString().ToString(), lblSelectedRecord.Text.Split(',')[j].Trim().ToString(), true.ToString(), Session["UserId"].ToString(), DateTime.Now.ToString());
                    }
                }
            }

            if (Msg != 0)
            {
                FillGrid();
                FillGridBin();
                ViewState["Select"]    = null;
                lblSelectedRecord.Text = "";
                DisplayMessage("Record Activated");
            }
            else
            {
                int fleg = 0;
                foreach (GridViewRow Gvr in GvExaminationBin.Rows)
                {
                    CheckBox chk = (CheckBox)Gvr.FindControl("chkgvSelect");
                    if (chk.Checked)
                    {
                        fleg = 1;
                    }
                    else
                    {
                        fleg = 0;
                    }
                }
                if (fleg == 0)
                {
                    DisplayMessage("Please Select Record");
                }
                else
                {
                    DisplayMessage("Record Not Activated");
                }
            }
        }
        System.Web.UI.ScriptManager.GetCurrent(this).SetFocus(txtValueBin);
    }
コード例 #6
0
    protected void imgBtnRestore_Click(object sender, ImageClickEventArgs e)
    {
        int b = 0;

        if (lblSelectedRecord.Text != "")
        {
            for (int j = 0; j < lblSelectedRecord.Text.Split(',').Length; j++)
            {
                if (lblSelectedRecord.Text.Split(',')[j] != "")
                {
                    b = objProB.DeleteProductBrandMaster(StrCompId, lblSelectedRecord.Text.Split(',')[j].Trim(), true.ToString(), Session["UserId"].ToString(), DateTime.Now.ToString());
                }
            }
        }

        if (b != 0)
        {
            FillGrid();
            FillGridBin();
            lblSelectedRecord.Text = "";
            ViewState["Select"]    = null;
            DisplayMessage("Record Activated");
            btnRefreshBin_Click(null, null);
        }
        else
        {
            int fleg = 0;
            foreach (GridViewRow Gvr in gvProductBrandMasterBin.Rows)
            {
                CheckBox chk = (CheckBox)Gvr.FindControl("chkSelect");
                if (chk.Checked)
                {
                    fleg = 1;
                }
                else
                {
                    fleg = 0;
                }
            }
            if (fleg == 0)
            {
                DisplayMessage("Please Select Record");
            }
            else
            {
                DisplayMessage("Record Not Activated");
            }
        }

        txtValueBin.Focus();
    }
コード例 #7
0
    protected void imgBtnRestore_Click(object sender, ImageClickEventArgs e)
    {
        int b = 0;

        if (lblSelectedRecord.Text != "")
        {
            for (int j = 0; j < lblSelectedRecord.Text.Split(',').Length; j++)
            {
                if (lblSelectedRecord.Text.Split(',')[j] != "")
                {
                    b = ObjInvUnitMaster.DeleteUnitMaster(StrCompId.ToString(), lblSelectedRecord.Text.Split(',')[j].Trim(), true.ToString(), StrUserId.ToString(), DateTime.Now.ToString());
                }
            }
        }

        if (b != 0)
        {
            FillConversionUnitDDL("");
            FillGrid();
            FillGridBin();
            lblSelectedRecord.Text = "";
            ViewState["Select"]    = null;
            DisplayMessage("Record Activated");
        }
        else
        {
            int fleg = 0;
            foreach (GridViewRow Gvr in gvUnitMasterBin.Rows)
            {
                CheckBox chk = (CheckBox)Gvr.FindControl("chkgvSelect");
                if (chk.Checked)
                {
                    fleg = 1;
                }
                else
                {
                    fleg = 0;
                }
            }
            if (fleg == 0)
            {
                DisplayMessage("Please Select Record");
            }
            else
            {
                DisplayMessage("Record Not Activated");
            }
        }
        txtbinValue.Focus();
    }
コード例 #8
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        DataTable DtReport = new DataTable();
        int       b        = 0;

        if (lblSelectedRecord.Text != "")
        {
            DtReport = ObjFile.Get_FileTransaction(Session["CompId"].ToString(), "0");
            if (DtReport.Rows.Count > 0)
            {
                Session["Querystring"] = lblSelectedRecord.Text;
                Session["ClaimRecord"] = DtReport;
                Response.Redirect("../HR_Report/DirectoryReport.aspx");
            }
            else
            {
                DisplayMessage("Record Not Found");
                return;
            }
        }



        else
        {
            int fleg = 0;
            foreach (GridViewRow Gvr in gvDirMaster.Rows)
            {
                CheckBox chk = (CheckBox)Gvr.FindControl("chkgvSelect");
                if (chk.Checked)
                {
                    fleg = 1;
                }
                else
                {
                    fleg = 0;
                }
            }
            if (fleg == 0)
            {
                DisplayMessage("Please Select Record");
            }
            else
            {
                //DisplayMessage("");
            }
        }
    }