Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        FileID = Convert.ToInt32(Request.QueryString["FileID"]);

        DataTable dsGetLastestFileInfoByID = BLL_QMSDB_Procedures.QMSDBProcedures_History(FileID);

        if (dsGetLastestFileInfoByID.Rows.Count > 0)
        {
            DataRow dr = dsGetLastestFileInfoByID.Rows[0];
            lblFileName.Text = dr["FILESNAME"].ToString();
            if (dr["CREATED_BY"].ToString() != "")
            {
                lblCreatedBy.Text = dr["CREATED_BY"].ToString();
            }
            else
            {
                lblCreatedBy.Text = "Office";
            }

            lblCreationDate.Text = ConvertDateToString(dr["CREATED_DATE"].ToString(), "dd-MMM-yy HH:mm");
            //if (dr["Opp_User"].ToString() != "")
            //{
            //    lblLastOperation.Text = dr["Operation_Type"].ToString() + " by " + dr["Opp_User"].ToString();
            //    lblLastOperationDt.Text = ConvertDateToString(dr["Operation_date"].ToString(), "dd-MMM-yy HH:mm");
            //}
        }

        // DataSet dsOperationDetailsByID = objQMS.GetOprationDetailsByID(FileID);

        //dvOperations.DataSource = dsOperationDetailsByID.Tables[0];
        //dvOperations.DataBind();

        dtrOppGrid.DataSource = dsGetLastestFileInfoByID;
        dtrOppGrid.DataBind();
    }
Ejemplo n.º 2
0
    protected void btnSendForApproval_Click(object sender, EventArgs e)
    {
        int    i  = BLL_QMSDB_Procedures.QMSDBProcedures_SendApprovel(int.Parse(Request.QueryString["PROCEDURE_ID"].ToString()), txtComments.Text, UDFLib.ConvertIntegerToNull(lstUser.SelectedValue), ddlStatus.SelectedValue, int.Parse(Session["USERID"].ToString()));
        string js = "alert('Query Saved !!');hideModal('DivSendForApp');";

        ScriptManager.RegisterStartupScript(this, this.GetType(), "script2", js, true);
    }
Ejemplo n.º 3
0
 protected void btnAccessSave_Click(object sender, EventArgs e)
 {
     try
     {
         foreach (GridViewRow gvr in gvUserProcedure.Rows)
         {
             if ((gvr.FindControl("chkAll") as CheckBox).Checked == true || (gvr.FindControl("chkView") as CheckBox).Checked == true || (gvr.FindControl("chkAdd") as CheckBox).Checked == true || (gvr.FindControl("chkEdit") as CheckBox).Checked == true || (gvr.FindControl("chkDelete") as CheckBox).Checked == true)
             {
                 string lblProcedureId = ((Label)gvr.FindControl("lblProcedureId")).Text;
                 if ((gvr.FindControl("chkAll") as CheckBox).Checked == true)
                 {
                     int i = BLL_QMSDB_Procedures.QMSDBProcedure_Insert_UserAccess(int.Parse(lstUser.SelectedValue), UDFLib.ConvertIntegerToNull(lblProcedureId), 1, 1, 1, 1, UDFLib.ConvertIntegerToNull(Session["USERID"].ToString()));
                 }
                 else
                 {
                     int chkView   = (gvr.FindControl("chkView") as CheckBox).Checked == true ? 1 : 0;
                     int chkAdd    = (gvr.FindControl("chkAdd") as CheckBox).Checked == true ? 1 : 0;
                     int chkEdit   = (gvr.FindControl("chkEdit") as CheckBox).Checked == true ? 1 : 0;
                     int chkDelete = (gvr.FindControl("chkDelete") as CheckBox).Checked == true ? 1 : 0;
                     int i         = BLL_QMSDB_Procedures.QMSDBProcedure_Insert_UserAccess(int.Parse(lstUser.SelectedValue), UDFLib.ConvertIntegerToNull(lblProcedureId), chkView, chkAdd, chkEdit, chkDelete, UDFLib.ConvertIntegerToNull(Session["USERID"].ToString()));
                 }
             }
         }
         BindFolderToUserAccess();
     }
     catch (Exception ex)
     {
         string js = "alert('" + ex.Message.Replace("'", "") + "');";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "script2", js, true);
     }
 }
Ejemplo n.º 4
0
    public void BindFbmReadSearch()
    {
        int rowcount = ucCustomPagerItems.isCountRecord;

        string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString());
        int?   sortdirection = null; if (ViewState["SORTDIRECTION"] != null)
        {
            sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString());
        }

        DataSet ds = BLL_QMSDB_Procedures.GetReadProcedureSearch(UDFLib.ConvertIntegerToNull(DDLFleet.SelectedValue), UDFLib.ConvertIntegerToNull(DDLVessel.SelectedValue)
                                                                 , UDFLib.ConvertIntegerToNull(ddlFbmList.SelectedValue), txtSearchBy.Text.Trim()
                                                                 , UDFLib.ConvertIntegerToNull(ddlRank.SelectedValue), UDFLib.ConvertIntegerToNull(rdoFBMReadStatus.SelectedValue)
                                                                 , sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount);


        if (ucCustomPagerItems.isCountRecord == 1)
        {
            ucCustomPagerItems.CountTotalRec = rowcount.ToString();
            ucCustomPagerItems.BuildPager();
        }

        if (ds.Tables[0].Rows.Count > 0)
        {
            gvFbmRead.DataSource = ds.Tables[0];
            gvFbmRead.DataBind();
        }
        else
        {
            gvFbmRead.DataSource = ds.Tables[0];
            gvFbmRead.DataBind();
        }
    }
Ejemplo n.º 5
0
    //int fileID = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        lblProcedureId.Attributes.Add("style", "visibility:hidden");

        if (AjaxFileUploadInsertImage.IsInFileUploadPostBack)
        {
        }
        else
        {
            if (!IsPostBack)
            {
                BindUserList();
                txtProcedureSectionDetails.config.toolbar = new object[]
                { new object[] { "Source", "-", "Save", "NewPage", "Preview", "-", "Templates" },
                  new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker", "Scayt" },
                  new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" },
                  new object[] { "Form", "Checkbox", "Radio", "TextField", "Textarea", "Select", "Button", "ImageButton", "HiddenField" },
                  "/",
                  new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" },
                  new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote", "CreateDiv" },
                  new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" },
                  new object[] { "BidiLtr", "BidiRtl" },
                  new object[] { "Link", "Unlink", "Anchor" },
                  new object[] { "Image", "Flash", "Table", "HorizontalRule", "Smiley", "SpecialChar", "PageBreak", "Iframe" },
                  "/",
                  new object[] { "Styles", "Format", "Font", "FontSize" },
                  new object[] { "TextColor", "BGColor" },
                  new object[] { "Maximize", "ShowBlocks", "-", "InsertImage" }, };
                // fileID = Convert.ToInt32(Request.PathInfo.Substring(1));
                lblProcedureId.Text = Request.QueryString["FileID"].ToString();
                txtProcedureSectionDetails.Width = 800;
                ////get the version & Operation info by Check out fileID
                DataTable dsOperationInfo = BLL_QMSDB_Procedures.QMSDBProcedures_Edit(int.Parse(lblProcedureId.Text));
                if (dsOperationInfo.Rows.Count > 0)
                {
                    //get the last row of the table to know the current status of the file

                    string FileStatus = dsOperationInfo.Rows[0]["CHECK_INOUT_STATUS"].ToString();
                    string User       = dsOperationInfo.Rows[0]["MODIFIED_BY"].ToString();

                    if (FileStatus == "true" && (Convert.ToInt32(Session["USERID"]) != Convert.ToInt32(dsOperationInfo.Rows[0]["MODIFIED_BY"].ToString())))
                    {
                        string Message = "The file is already Checked Out by " + dsOperationInfo.Rows[0]["MODIFIED_BY"].ToString();
                        String msg     = String.Format("myMessage('" + Message + "')");
                        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msg", msg, true);
                    }
                    else
                    {
                        showSaveDialog();
                    }
                }
                else
                {
                    showSaveDialog();
                }
            }
        }
        LoadtreeView();
    }
Ejemplo n.º 6
0
    protected void btnSendForApproval_Click(object sender, EventArgs e)
    {
        TreeNode selectedNode = BrowseTreeView.SelectedNode;
        int      sectionId    = int.Parse(selectedNode.Value.ToString());
        int      i            = BLL_QMSDB_Procedures.QMSDBProcedures_SendApprovel(int.Parse(lblProcedureId.Text), txtComments.Text, UDFLib.ConvertIntegerToNull(lstUser.SelectedValue), ddlStatus.SelectedItem.Text, int.Parse(Session["USERID"].ToString()));
        string   js           = "alert('Query Saved !!');hideModal('DivSendForApp');";

        ScriptManager.RegisterStartupScript(this, this.GetType(), "script2", js, true);
    }
    protected void Page_Load(object sender, EventArgs e)
    {


        if (AjaxFileUploadInsertImage.IsInFileUploadPostBack)
        {

        }
        else
        {

            if (!IsPostBack)
            {
              DataTable dtprocedure=  BLL_QMSDB_Procedures.QMSDBProcedures_Edit(Convert.ToInt32(Request.QueryString["PROCEDURE_ID"]));
              txtProcedureName.Text = Convert.ToString(dtprocedure.Rows[0]["PROCEDURES_NAME"]);
              txtProcedureCode.Text = Convert.ToString(dtprocedure.Rows[0]["PROCEDURE_CODE"]);

                Session["UploadedFiles_Name"] = "";
              
                Load_Sections();
                if (Request.QueryString["CheckOut"] != null)
                {
                    CheckCheckOut(Request.QueryString["PROCEDURE_ID"]);
                }
                imgbtnPreviewProdecure_Click(null, null); 
            }
            string js = "initScripts();";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "script1", js, true);


            txtProcedureSectionDetails.config.toolbar = new object[]
              { 
                  new object[] {   "Templates" },
                new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker", "Scayt","Image" },
                new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" },
                new object[] { "Checkbox", "Radio", "TextField", "Textarea", "Select", "Button", "ImageButton" },
                 new object[] { "InsertImage", "Table", "HorizontalRule", "Smiley", "SpecialChar", "PageBreak"  },
               
                new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" },
                new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote"  },
                new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" },
                new object[] { "BidiLtr", "BidiRtl" },
                new object[] { "Link", "Unlink", "Anchor" }, 
             "/",
                             
                new object[] { "Styles", "Format", "Font", "FontSize" },
                new object[] { "TextColor", "BGColor" },
              
            };


            BindUserList();
            btnLoadUploadedFiles_Click(null, null);


        }
    }
Ejemplo n.º 8
0
 protected void DeleteProcedure(object sender, CommandEventArgs e)
 {
     try
     {
         string procedureid = e.CommandArgument.ToString();
         int    i           = BLL_QMSDB_Procedures.Upd_QMSDBProcedures_Delete(int.Parse(procedureid), int.Parse(Session["USERID"].ToString()));
     }
     catch (Exception ex)
     {
     }
 }
Ejemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        lblProcedureId.Attributes.Add("style", "visibility:hidden");


        if (!IsPostBack)
        {
            txtProcedureDetails.config.toolbar = new object[]
            {
                new object[] { "Print" },
            };
            txtProcedureDetails.BodyClass = "cke_show_borders";
            txtProcedureDetails.Enabled   = false;
            txtProcedureDetails.ReadOnly  = true;
            txtProcedureDetails.FilebrowserImageUploadUrl = "true";
            txtProcedureDetails.BackColor = System.Drawing.Color.LightYellow;
            txtProcedureDetails.Width     = 900;

            if (Convert.ToString(Session["userid"]) == "")
            {
                Response.Write("<center><br><br><h2><font color=gray>Session is lost. Please click on the Logout option and login again.</font></h2></center>");
                Response.End();
            }
            if (Request.QueryString["DocVer"] != null)
            {
                if (Request.QueryString["DocVer"].ToString() != "")
                {
                    string[] temp = Request.QueryString["DocVer"].ToString().Split('-');
                    DocID = temp[0];
                    //DocVersion = temp[1];
                }
            }
            else
            {
                DocID = Request.QueryString["DocID"];
                lblProcedureId.Text = Request.QueryString["DocID"];
            }
            System.Data.DataTable dsFileDetails = BLL_QMSDB_Procedures.QMSDBProcedures_Edit(int.Parse(lblProcedureId.Text));

            if (dsFileDetails.Rows.Count > 0)
            {
                DataRow dr = dsFileDetails.Rows[0];
                lblDocName.Text         = dr["PROCEDURE_CODE"].ToString() + "/" + dr["PROCEDURES_NAME"].ToString();
                lblCurrentVersion.Text  = dr["PUBLISH_VERSION"].ToString();
                lblProcedureStatus.Text = dr["PROCEDURE_STATUS"].ToString();
                //lblDetails.Text = dr["HeaderDetails"].ToString().Replace("@PROCEDURECODE", dr["PROCEDURE_CODE"].ToString()).Replace("@publishDate", dr["PUBLISHED_DATE"].ToString()).Replace("@ApproverName", dr["PUBLISHED_BY"].ToString()).Replace("@CreatedBy", dr["CREATED_BY_USER"].ToString()) + dr["DETAILS"].ToString();
                lblDetails.Text = dr["DETAILS"].ToString();
                // txtProcedureDetails.Text = dr["HeaderDetails"].ToString() + dr["DETAILS"].ToString();

                lblHeader.Text           = dr["HeaderDetails"].ToString().Replace("@ProcedureCode", dr["PROCEDURE_CODE"].ToString()).Replace("@publishdate", dr["PUBLISHED_DATE"].ToString()).Replace("@ApproverName", dr["PUBLISHED_BY"].ToString()).Replace("@CreatedBy", dr["CREATED_BY_USER"].ToString()).Replace("@UserName", dr["CREATED_BY_USER"].ToString()).Replace("@FolderName", dr["FOLDER_NAME"].ToString()).Replace("@historiCode", dr["PUBLISH_VERSION"].ToString());
                txtProcedureDetails.Text = lblHeader.Text + dr["DETAILS"].ToString();
            }
        }
    }
Ejemplo n.º 10
0
    private void BindFolderToUserAccess()
    {
        int countval = 1;

        if (TreeView1.SelectedNode != null && UDFLib.ConvertIntegerToNull(lstUser.SelectedValue) != null)
        {
            string    NodeValue = TreeView1.SelectedNode.Value;
            DataTable dt        = BLL_QMSDB_Procedures.QMSDBProcedur_UserAccess(int.Parse(lstUser.SelectedValue), UDFLib.ConvertIntegerToNull(NodeValue), null, 1, 10, ref countval);
            gvUserProcedure.DataSource = dt;
            gvUserProcedure.DataBind();
        }
    }
Ejemplo n.º 11
0
    private void BindFolderToVEsssel()
    {
        int countval = 1;

        if (trvFolder.SelectedNode != null && UDFLib.ConvertIntegerToNull(DDLVessel.SelectedValue) != null)
        {
            string    NodeValue = trvFolder.SelectedNode.Value;
            DataTable dt        = BLL_QMSDB_Procedures.QMSDBProcedur_VesselAccess(int.Parse(DDLVessel.SelectedValue), UDFLib.ConvertIntegerToNull(NodeValue), null, 1, 10, ref countval);
            gvVesselAccess.DataSource = dt;
            gvVesselAccess.DataBind();
        }
    }
Ejemplo n.º 12
0
    protected void BindPendingPublishDoc()
    {
        int       rowcount      = ucCustomPagerItems.isCountRecord;
        DataTable dtPendingList = BLL_QMSDB_Procedures.QMSDBProcedure_PendingApprovel(int.Parse(Session["USERID"].ToString()), ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount);

        gvPendingPublishDoc.DataSource = dtPendingList;
        gvPendingPublishDoc.DataBind();
        if (ucCustomPagerItems.isCountRecord == 1)
        {
            ucCustomPagerItems.CountTotalRec = rowcount.ToString();
            ucCustomPagerItems.BuildPager();
        }
    }
Ejemplo n.º 13
0
    public void BindPendingPublishDoc()
    {
        int       rowcount      = ucCustomPagerItems.isCountRecord;
        DataTable dtPendingList = BLL_QMSDB_Procedures.ProceduresCheckListSearch(5, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount);

        gvCheckList.DataSource = dtPendingList;
        gvCheckList.DataBind();
        if (ucCustomPagerItems.isCountRecord == 1)
        {
            ucCustomPagerItems.CountTotalRec = rowcount.ToString();
            ucCustomPagerItems.BuildPager();
        }
    }
Ejemplo n.º 14
0
    public void browseFileDialog()
    {
        //save the check out information into the database
        int i = BLL_QMSDB_Procedures.QMSDBProcedure_CheckOUT(int.Parse(lblProcedureId.Text), Convert.ToInt32(Session["USERID"]));
        //get latest File details by the file ID
        DataTable dsFileDetails = BLL_QMSDB_Procedures.QMSDBProcedures_Edit(int.Parse(lblProcedureId.Text));

        string navURL = "";

        if (dsFileDetails.Rows.Count > 0)
        {
            txtProcedureSectionDetails.Text = dsFileDetails.Rows[0]["DETAILS"].ToString();
        }
    }
Ejemplo n.º 15
0
    public void BindFBMDLL()
    {
        try
        {
            DataTable dtFbmList = BLL_QMSDB_Procedures.GetProcedureList();
            ddlFbmList.DataTextField  = "PROCEDURES_NAME";
            ddlFbmList.DataValueField = "PROCEDURE_ID";
            ddlFbmList.DataSource     = dtFbmList;
            ddlFbmList.DataBind();
            ddlFbmList.Items.Insert(0, new ListItem("-SELECT-", "0"));
        }
        catch

        {
        }
    }
Ejemplo n.º 16
0
    protected void btnResetMenu_Click(object sender, EventArgs e)
    {
        try
        {
            foreach (GridViewRow gvr in gvVesselAccess.Rows)
            {
                string lblProcedureId = ((Label)gvr.FindControl("lblProcedureId")).Text;

                int i = BLL_QMSDB_Procedures.QMSDBProcedure_Delete_UserAccess(int.Parse(lstUser.SelectedValue), UDFLib.ConvertIntegerToNull(lblProcedureId), int.Parse(Session["USERID"].ToString()));
            }
            BindFolderToUserAccess();
        }
        catch (Exception ex)
        {
        }
    }
Ejemplo n.º 17
0
 protected void btnSaveCommand_Click(object sender, EventArgs e)
 {
     try
     {
         int Res = BLL_QMSDB_Procedures.QMSDBProcedures_InsertWithSection(txtProcedureCode.Text, txtProcedureName.Text, UDFLib.ConvertToInteger(ddlFolderName.SelectedValue), FileWateMark.Checked == true ? 1 : 0, UDFLib.ConvertIntegerToNull(ddlHeaderTemplate.SelectedValue), UDFLib.ConvertIntegerToNull(ddlFooterTemlate.SelectedValue), UDFLib.ConvertToInteger(Session["USERID"]), "");
         if (Res > 0)
         {
             string js = "alert('Query Saved !!'); hideModal('dvSaveCommand');";
             ScriptManager.RegisterStartupScript(this, this.GetType(), "script2", js, true);
         }
     }
     catch (Exception ex)
     {
         string js = "alert('" + ex.Message.Replace("'", "") + "');";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "script2", js, true);
     }
 }
Ejemplo n.º 18
0
    protected void ImgExpExcel_Click(object sender, ImageClickEventArgs e)
    {
        int rowcount = ucCustomPagerItems.isCountRecord;

        string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString());
        int?   sortdirection = null; if (ViewState["SORTDIRECTION"] != null)
        {
            sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString());
        }

        DataTable dtPendingList = BLL_QMSDB_Procedures.QMSDBProcedures_Search((DataTable)Session["sFleet"], (DataTable)Session["sVesselCode"], UDFLib.ConvertIntegerToNull(lstDept.SelectedValue), UDFLib.ConvertIntegerToNull(lstUser.SelectedValue), txtSearch.Text, sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount);

        string[] HeaderCaptions  = { "Vessel", "Folder Name", "Procedure Code", "Procedure Name", "Department", "Access User", "Publish Date", "Publish Version", "Created By", "Approved By" };
        string[] DataColumnsName = { "Vessel_Name", "Folder_Name", "PROCEDURE_CODE", "PROCEDURES_NAME", "Department", "User_name", "CREATED_DATE", "PUBLISH_VERSION", "CREATED_USER", "User_name" };

        GridViewExportUtil.ExportToExcel(dtPendingList, HeaderCaptions, DataColumnsName, "ProcedureList", "Procedure List");
    }
Ejemplo n.º 19
0
    protected void btnSaveCommand_Click(object sender, EventArgs e)
    {
        try
        {
            int PROCEDURE_ID = BLL_QMSDB_Procedures.QMSDBProcedures_InsertWithSection(txtProcedureCode.Text, txtProcedureName.Text, UDFLib.ConvertToInteger(ddlFolderName.SelectedValue), FileWateMark.Checked == true ? 1 : 0, UDFLib.ConvertIntegerToNull(ddlHeaderTemplate.SelectedValue), UDFLib.ConvertIntegerToNull(ddlFooterTemlate.SelectedValue), UDFLib.ConvertToInteger(Session["USERID"]), "");
            if (PROCEDURE_ID > 0)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "reloadparent", "parent.RealoadParent();", true);
                ResponseHelper.Redirect("ProcedureBuilder.aspx?PROCEDURE_ID=" + PROCEDURE_ID.ToString(), "blank", "");
            }
        }

        catch (Exception ex)
        {
            string js = "alert('" + ex.Message.Replace("'", "") + "');";
            Page.ClientScript.RegisterStartupScript(GetType(), "script", js, true);
        }
    }
Ejemplo n.º 20
0
    public void showSaveDialog(string procedureid)
    {
        //checking for avoid the multiple Check Out the file
        DataTable dsOperationInfo = BLL_QMSDB_Procedures.QMSDBProcedures_Edit(int.Parse(procedureid));

        if (dsOperationInfo.Rows.Count > 0)
        {
            if (dsOperationInfo.Rows[0]["CHECK_INOUT_STATUS"].ToString() == "1")
            {
                String msg = String.Format("alert('You have already Checked Out the file.');window.close();");
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msg", msg, true);
            }
            else
            {
                int i = BLL_QMSDB_Procedures.QMSDBProcedure_CheckOUT(int.Parse(procedureid), Convert.ToInt32(Session["USERID"]));
            }
        }
    }
Ejemplo n.º 21
0
    public void BindPublishDoc()
    {
        int rowcount = ucCustomPagerItems.isCountRecord;

        string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString());
        int?   sortdirection = null; if (ViewState["SORTDIRECTION"] != null)
        {
            sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString());
        }
        DataTable dtPendingList = BLL_QMSDB_Procedures.QMSDBProcedures_Search((DataTable)Session["sFleet"], (DataTable)Session["sVesselCode"], UDFLib.ConvertIntegerToNull(lstDept.SelectedValue), UDFLib.ConvertIntegerToNull(lstUser.SelectedValue), txtSearch.Text, sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount);

        gvProcedureList.DataSource = dtPendingList;
        gvProcedureList.DataBind();
        if (ucCustomPagerItems.isCountRecord == 1)
        {
            ucCustomPagerItems.CountTotalRec = rowcount.ToString();
            ucCustomPagerItems.BuildPager();
        }
    }
Ejemplo n.º 22
0
    protected void btnExport_Click(object sender, ImageClickEventArgs e)
    {
        int    rowcount      = ucCustomPagerItems.isCountRecord;
        string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString());
        int?   sortdirection = null; if (ViewState["SORTDIRECTION"] != null)
        {
            sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString());
        }

        DataSet ds = BLL_QMSDB_Procedures.GetReadProcedureSearch(UDFLib.ConvertIntegerToNull(DDLFleet.SelectedValue), UDFLib.ConvertIntegerToNull(DDLVessel.SelectedValue)
                                                                 , UDFLib.ConvertIntegerToNull(ddlFbmList.SelectedValue), txtSearchBy.Text.Trim()
                                                                 , UDFLib.ConvertIntegerToNull(ddlRank.SelectedValue), UDFLib.ConvertIntegerToNull(rdoFBMReadStatus.SelectedValue)
                                                                 , sortbycoloumn, sortdirection, null, null, ref rowcount);

        string[] HeaderCaptions  = { "Vessel", "Rank", "Staff Code", "Name", " Read On" };
        string[] DataColumnsName = { "Vessel_Name", "Rank_Short_Name", "Staff_Code", "Staff_FullName", "FBM_DATE_READ" };

        GridViewExportUtil.ShowExcel(ds.Tables[0], HeaderCaptions, DataColumnsName, "Fbm Read Report", "Fbm Read Report");
    }
Ejemplo n.º 23
0
    protected void btnVesselSave_Click(object sender, EventArgs e)
    {
        try
        {
            foreach (GridViewRow gvr in gvVesselAccess.Rows)
            {
                if ((gvr.FindControl("chkVessel") as CheckBox).Checked == true)
                {
                    string lblProcedureId = ((Label)gvr.FindControl("lblProcedureId")).Text;

                    int i = BLL_QMSDB_Procedures.QMSDBProcedure_Insert_VesselAccess(int.Parse(DDLVessel.SelectedValue), UDFLib.ConvertIntegerToNull(lblProcedureId), int.Parse(Session["USERID"].ToString()));
                }
            }
            BindFolderToVEsssel();
        }
        catch (Exception ex)
        {
            string js = "alert('" + ex.Message.Replace("'", "") + "');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "script2", js, true);
        }
    }
Ejemplo n.º 24
0
    /// <summary>
    /// this is  check the all the condition & operation for particular file, give the apropriate  message to end user.
    /// </summary>
    public void showSaveDialog()
    {
        //checking for avoid the multiple Check Out the file
        DataTable dsOperationInfo = BLL_QMSDB_Procedures.QMSDBProcedures_Edit(int.Parse(lblProcedureId.Text));

        if (dsOperationInfo.Rows.Count > 0)
        {
            if (dsOperationInfo.Rows[0]["CHECK_INOUT_STATUS"].ToString() == "true")
            {
                String msg = String.Format("myMessage('You have already Checked Out the file.');window.location.href='fileloader.aspx?docid=" + lblProcedureId.Text + "';");
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msg", msg, true);
            }
            else
            {
                browseFileDialog();
            }
        }
        else
        {
            browseFileDialog();
        }
    }
Ejemplo n.º 25
0
    public void CheckCheckOut(string procedureid)
    {
        DataTable dsOperationInfo = BLL_QMSDB_Procedures.QMSDBProcedures_Edit(int.Parse(procedureid));

        if (dsOperationInfo.Rows.Count > 0)
        {
            //get the last row of the table to know the current status of the file

            string FileStatus = dsOperationInfo.Rows[0]["CHECK_INOUT_STATUS"].ToString();
            string User       = dsOperationInfo.Rows[0]["MODIFIED_BY"].ToString();

            if (FileStatus == "1" && (Convert.ToInt32(Session["USERID"]) != Convert.ToInt32(dsOperationInfo.Rows[0]["MODIFIED_BY"].ToString())))
            {
                string Message = "The file is already Checked Out by " + dsOperationInfo.Rows[0]["MODIFIED_BY"].ToString();
                String msg     = String.Format("alert('" + Message + "');window.close();");
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msg", msg, true);
            }
            else
            {
                showSaveDialog(procedureid);
            }
        }
    }
Ejemplo n.º 26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataTable dtprocedure = BLL_QMSDB_Procedures.QMSDBProcedures_Edit(Convert.ToInt32(Request.QueryString["PROCEDURE_ID"]));
            txtProcedureName.Text = Convert.ToString(dtprocedure.Rows[0]["PROCEDURES_NAME"]);
            txtProcedureCode.Text = Convert.ToString(dtprocedure.Rows[0]["PROCEDURE_CODE"]);

            Session["UploadedFiles_Name"] = "";

            Load_Sections();
            if (Request.QueryString["CheckOut"] != null)
            {
                CheckCheckOut(Request.QueryString["PROCEDURE_ID"]);
            }
            imgbtnPreviewProdecure_Click(null, null);
        }
        string js = "initScripts();";

        ScriptManager.RegisterStartupScript(this, this.GetType(), "script1", js, true);
        BindUserList();
        btnLoadUploadedFiles_Click(null, null);
    }
Ejemplo n.º 27
0
    private void BindProcedures(string procedureId)
    {
        DataTable dtProc;

        txtProcedureDetails.ReadOnly = true;
        if (Request.QueryString["FileStatus"].ToString() == "View")
        {
            dtProc = BLL_QMSDB_Procedures.QMSDBProcedures_Edit(int.Parse(procedureId));
            if (dtProc.Rows.Count > 0)
            {
                txtProcedureDetails.Text = dtProc.Rows[0]["HeaderDetails"].ToString().Replace("@ProcedureCode", dtProc.Rows[0]["PROCEDURE_CODE"].ToString()).Replace("@publishdate", dtProc.Rows[0]["PUBLISHED_DATE"].ToString()).Replace("@ApproverName", dtProc.Rows[0]["PUBLISHED_BY"].ToString()).Replace("@CreatedBy", dtProc.Rows[0]["CREATED_BY_USER"].ToString()).Replace("@UserName", dtProc.Rows[0]["CREATED_BY_USER"].ToString()).Replace("@FolderName", dtProc.Rows[0]["FOLDER_NAME"].ToString()).Replace("@historiCode", dtProc.Rows[0]["PUBLISH_VERSION"].ToString()) + dtProc.Rows[0]["DETAILS"].ToString();
                lblProcedureName.Text    = dtProc.Rows[0]["PROCEDURE_CODE"].ToString() + " / " + dtProc.Rows[0]["PROCEDURES_NAME"].ToString();
                pnlCtl.Visible           = false;
            }
        }
        else if (Request.QueryString["FileStatus"].ToString() == "ViewEdit")
        {
            dtProc = BLL_QMSDB_Procedures.QMSDBProcedures_Edit(int.Parse(procedureId));
            if (dtProc.Rows.Count > 0)
            {
                txtProcedureDetails.Text = dtProc.Rows[0]["HeaderDetails"].ToString().Replace("@ProcedureCode", dtProc.Rows[0]["PROCEDURE_CODE"].ToString()).Replace("@publishdate", dtProc.Rows[0]["PUBLISHED_DATE"].ToString()).Replace("@ApproverName", dtProc.Rows[0]["PUBLISHED_BY"].ToString()).Replace("@CreatedBy", dtProc.Rows[0]["CREATED_BY_USER"].ToString()).Replace("@UserName", dtProc.Rows[0]["CREATED_BY_USER"].ToString()).Replace("@FolderName", dtProc.Rows[0]["FOLDER_NAME"].ToString()).Replace("@historiCode", dtProc.Rows[0]["PUBLISH_VERSION"].ToString()) + dtProc.Rows[0]["CHANGE_DETAILS"].ToString();
                lblProcedureName.Text    = dtProc.Rows[0]["PROCEDURE_CODE"].ToString() + " / " + dtProc.Rows[0]["PROCEDURES_NAME"].ToString();
            }
        }
        else if (Request.QueryString["FileStatus"].ToString() == "Compare")
        {
            dtProc = BLL_QMSDB_Procedures.QMSDBProcedures_Edit(int.Parse(procedureId));
            if (dtProc.Rows.Count > 0)
            {
                Merger a = new Merger(dtProc.Rows[0]["DETAILS"].ToString(), dtProc.Rows[0]["CHANGE_DETAILS"].ToString());

                lblProcedureName.Text    = dtProc.Rows[0]["PROCEDURE_CODE"].ToString() + " / " + dtProc.Rows[0]["PROCEDURES_NAME"].ToString();
                txtProcedureDetails.Text = a.merge();
            }
        }
    }