Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string req_no = WebTools.GetExpr("PICKLING_REQ_NO", "PIP_PICKLING_SPL", " WHERE SPL_PICKLING_ID=" + Request.QueryString["SPL_PICKLING_ID"]);
         Master.HeadingMessage = "Spool Pickling (" + req_no + ")";
         HiddenSC.Value        = WebTools.GetExpr("SC_ID", "PIP_PICKLING_SPL", " WHERE SPL_PICKLING_ID = '" + Request.QueryString["SPL_PICKLING_ID"] + "'");
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string title = WebTools.GetExpr("ISO_TITLE1 || ' - ' || SHEET || ' - ' || SPOOL || ' - ' || 'P#' || PT_NO || ' - ' || MAT_CODE1",
                                         "VIEW_BOM_TOTAL", "BOM_ID=" + Request.QueryString["BOM_ID"]);
         Master.HeadingMessage = title + " Status";
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         HiddenField1.Value     = WebTools.GetExpr("MAT_CODE1", "PIP_MAT_STOCK", " MAT_ID = '" + Request.QueryString["MAT_ID"] + "'");
         Master.HeadingMessage  = "LINE MTO<br/>";
         Master.HeadingMessage += HiddenField1.Value;
     }
 }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage  = "PO Split Details (";
         Master.HeadingMessage += WebTools.GetExpr("PO_NO", "PIP_PO", " WHERE PO_ID = '" + Request.QueryString["PO_ID"] + "'");
         Master.HeadingMessage += ")";
     }
 }
Ejemplo n.º 5
0
    protected void IssueGridView_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item     = (GridDataItem)e.Item;
            string       issue_id = item.GetDataKeyValue("ADD_ISSUE_ID").ToString();
            string       issue_no = WebTools.GetExpr("ISSUE_NO", "PIP_MAT_ISSUE_ADD", " ADD_ISSUE_ID = " + issue_id);
            string       filename = issue_no + ".pdf";

            string pdf_url     = WebTools.GetExpr("PATH", "DIR_OBJECTS", " PROJECT_ID = '" + Session["PROJECT_ID"].ToString() + "' AND DIR_OBJ = 'MAT_ISSUE'");
            string pdf_asp_url = WebTools.GetExpr("ASP_PATH", "DIR_OBJECTS", " PROJECT_ID = '" + Session["PROJECT_ID"].ToString() + "' AND DIR_OBJ = 'MAT_ISSUE'");

            string full_pdf_path = pdf_url + filename;
            string full_asp_path = pdf_asp_url + filename;
            Label  pdf_label     = (Label)item.FindControl("pdf");

            if (File.Exists(full_pdf_path))
            {
                string url     = "<a title='ISSUE PDF' href='" + full_asp_path + "' target='_blank'><img src='../Images/New-Icons/pdf.png'/></a>";
                Label  pdficon = (Label)item.FindControl("pdf");
                if (pdficon != null)
                {
                    pdficon.Text = url;
                }
            }
        }

        if (e.Item.IsInEditMode && e.Item is GridEditableItem)
        {
            string query = "SELECT * FROM USER_MODULE_COLUMNS WHERE NOT  EXISTS (SELECT 1 FROM USER_MODULE_ROLES WHERE  " +
                           " SEQ =USER_MODULE_COLUMNS.SEQ   AND  USER_ID IN (SELECT USER_ID FROM USERS WHERE USER_NAME ='" + Session["USER_NAME"] + "' ))  AND HIDE_COL_NAME IS NOT NULL  AND  MODULE_ID =22 ";
            DataTable        dt       = WebTools.getDataTable(query);
            GridEditableItem dataItem = e.Item as GridEditableItem;

            foreach (DataRow row in dt.Rows)
            {
                string hide_col = row["HIDE_COL_NAME"].ToString();
                dataItem[hide_col].Enabled             = false;
                dataItem[hide_col].Controls[0].Visible = false;
            }
            string lbl_query = "SELECT * FROM USER_MODULE_COLUMNS WHERE NOT  EXISTS (SELECT 1 FROM USER_MODULE_ROLES WHERE  " +
                               " SEQ =USER_MODULE_COLUMNS.SEQ   AND  USER_ID IN (SELECT USER_ID FROM USERS WHERE USER_NAME ='" + Session["USER_NAME"] + "' ))  AND LBL_COL_NAME IS NOT NULL  AND  MODULE_ID =22";
            DataTable lbl_dt    = WebTools.getDataTable(lbl_query);
            Label[]   descLabel = new Label[30];
            int       i         = 0;
            foreach (DataRow row in lbl_dt.Rows)
            {
                string lbl_col = row["LBL_COL_NAME"].ToString();

                string str = (dataItem[lbl_col].Controls[0] as TextBox).Text;
                descLabel[i]      = new Label();
                descLabel[i].Text = str;
                dataItem[lbl_col].Controls.Add(descLabel[i]);
                i++;
            }
        }
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        string result2;

        result2 = WebTools.GetExpr(
            "FNC_INSERT_SUPP_BOM_JC(" + Request.QueryString["JC_ID"] + ")", "DUAL", "");

        Response.Redirect("Supp_JobCard.aspx");
    }
 protected void ddlMatCode_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
 {
     if (ddlMatCode.SelectedValue != "")
     {
         txtMatDescr.Text = WebTools.GetExpr("MAT_DESCR", "PIP_MAT_STOCK", " WHERE MAT_ID='" + ddlMatCode.SelectedValue + "'");
         string sub_con_id = WebTools.GetExpr("SC_ID", "PIP_MAT_ISSUE_ADD", " WHERE ADD_ISSUE_ID='" + Request.QueryString["ADD_ISSUE_ID"] + "'");
         txtAvlQty.Text = WebTools.GetExpr("BAL_QTY", "VIEW_ITEM_REP_A", " WHERE MAT_ID='" + ddlMatCode.SelectedValue + "' and sub_con_id = '" + sub_con_id + "'");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage  = "Quarantine Details";
         Master.HeadingMessage += "<br/>";
         Master.HeadingMessage += WebTools.GetExpr("QRNTINE_NO", "PIP_QUARANTINE", " WHERE QRNTINE_ID='" + Request.QueryString["id"].ToString() + "'");
     }
 }
Ejemplo n.º 9
0
    protected void btnRunSimulation_Click(object sender, EventArgs e)
    {
        if (CollectSubCons())
        {
            if (sml_status.Equals("RUNNING"))
            {
                Master.ShowWarn("Ooops... Simulation is already running !!!");
                return;
            }

            btnSaveSettings_Click(sender, e);

            try
            {
                //CHECK status of
                //1. PO link
                //2. Line MTO simulation
                //3. Updae server status
                //if not running then proceed

                string po_status = "", any_update_running = "";

                po_status          = WebTools.GetExpr("CURRENT_STATUS", "PROJECT_JOB_LIST", "PROCESS_NAME='IMPORT_PO_DATA'");
                any_update_running = WebTools.CountExpr("PROCESS_NAME", "PROJECT_JOB_LIST", "PROCESS_GROUP='SERVER_UPDATE' AND CURRENT_STATUS='RUNNING'");

                //If IDF simulation and PO, both are completed
                if (!po_status.Equals("RUNNING") && any_update_running.Equals("0"))
                {
                    string sql = "";
                    WebTools.ExeSql("UPDATE PROJECT_JOB_LIST SET CURRENT_STATUS='RUNNING' WHERE  PROCESS_NAME='SITE_SIMULATION'");
                    sql = WebTools.GetExpr("SQL_TO_RUN", "PROJECT_JOB_LIST", " PROCESS_NAME='SITE_SIMULATION'");

                    WebTools.ExeSql(sql);
                    Master.ShowSuccess("You request for Site simulation has started !!!");
                }
                //If bom simulation is not running
                else
                {
                    WebTools.ExeSql("UPDATE PROJECT_JOB_LIST SET CURRENT_STATUS='REQUEST_TO_RUN' WHERE  PROCESS_NAME='SITE_SIMULATION'");
                    Master.ShowSuccess("You request for Simulation process is waiting to run!!!");
                }
                //Response.Redirect("~/UTILITIES/Amogh_Utilities.aspx");
                //UpateProgressContext();
            }
            catch (Exception exc)
            {
                if (exc.Message.Contains("ORA-27478"))
                {
                    Master.ShowWarn("Site simulation is already running !!!");
                }
                else
                {
                    Master.ShowWarn(exc.Message);
                }
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string nde_req = WebTools.GetExpr("NDE_REQ_NO", "PIP_NDE_REQUEST", "NDE_REQ_ID=" + Request.QueryString["NDE_REQ_ID"]);
         Master.HeadingMessage("Joint NDE Request : " + nde_req);
         Update_JointsDropDown();
     }
 }
Ejemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         scIdField.Value = WebTools.GetExpr("SUB_CON_ID", "PIP_FCRI", "FCRI_ID=" + Request.QueryString["FCRI_ID"]);
         string rel_no = WebTools.GetExpr("FCRI_NO", "PIP_FCRI", "FCRI_ID=" + Request.QueryString["FCRI_ID"]);
         Master.HeadingMessage = "Spools <br/>" + rel_no;
     }
 }
Ejemplo n.º 12
0
 protected void cboMM_SELECTedIndexChanged(object sender, EventArgs e)
 {
     if (cboBOM.SelectedValue.ToString() != "-1")
     {
         string net_qty = WebTools.GetExpr("NET_QTY", "PIP_BOM", " WHERE BOM_ID=" +
                                           cboBOM.SelectedValue.ToString());
         //txtIssuedQty.Text = net_qty;
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage("Spool Receive Detail" + "<br/>" + WebTools.GetExpr("RCV_NO", "PIP_SPL_RECEIVE", " WHERE RCV_ID=" + Request.QueryString["id"]));

            HiddenStoreID.Value = WebTools.GetExpr("STORE_ID", "PIP_SPL_RECEIVE", " WHERE RCV_ID=" + Request.QueryString["id"]);
        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (cboStore.SelectedValue.ToString().Equals("-1"))
        {
            txtReportNo.Text = "";
            Master.ShowWarn("Please select a store !");
            return;
        }
        string sql   = string.Empty;
        string po_id = ddlPOList.SelectedValue;

        if (ddlPOList.SelectedValue == "-11")
        {
            sql  = "INSERT INTO PIP_PO (PROJECT_ID, PO_NO, PO_TITLE, PO_DATE, PO_REV, MANUFACTURE, CREATE_BY) VALUES ";
            sql += " ('" + Session["PROJECT_ID"].ToString() + "', '" + txtPO.Text + "', '" + txtItemDescr.Text + "','" + System.DateTime.Today.ToString("dd-MMM-yyyy") + "',";
            sql += " '0', '" + txtSupplier.Text + "', '" + Session["USER_NAME"] + "')";

            WebTools.ExeSql(sql);

            po_id = WebTools.GetExpr("PO_ID", "PIP_PO", " WHERE PO_NO='" + txtPO.Text + "'");
        }

        sql = "INSERT INTO PIP_MAT_RECEIVE (PROJECT_ID,MAT_RCV_NO,RECV_DATE,RECV_BY,SHIP_NO,STORE_ID, PO_ID, ITEM_DESCR, SUPPLIER)" +
              " VALUES (" + Session["PROJECT_ID"].ToString() + ",'" +
              txtReportNo.Text + "','" + txtCreateDate.SelectedDate.Value.ToString("dd-MMM-yyyy") + "','" +
              txtRecvby.Text + "','" + txtShipNo.Text + "'," + cboStore.SelectedValue.ToString() +
              ",'" + po_id + "', '" + txtItemDescr.Text + "', '" + txtSupplier.Text + "')";
        try
        {
            General_Functions.ExeSql(sql);
            string mrv_id = WebTools.GetExpr("MAT_RCV_ID", "PIP_MAT_RECEIVE", " WHERE MAT_RCV_NO = '" + txtReportNo.Text + "'");
            if (!string.IsNullOrEmpty(mrv_id.Trim()))
            {
                for (int i = 0; i < txtAutoSRNNo.Entries.Count; i++)
                {
                    sql = "INSERT INTO PIP_MAT_RECEIVE_SRN (MRV_ID, SRN_NO) VALUES ('" + mrv_id + "', '" + txtAutoSRNNo.Entries[i].Text + "')";
                    WebTools.ExeSql(sql);
                }
            }
            Master.ShowMessage("MRV created successfully.");
        }
        catch (Exception ex)
        {
            string mrv_id = WebTools.GetExpr("MAT_RCV_ID", "PIP_MAT_RECEIVE", " WHERE MAT_RCV_NO = '" + txtReportNo.Text + "'");
            //string sql = string.Empty;
            if (!string.IsNullOrEmpty(mrv_id.Trim()))
            {
                //reset ---- in case of any error
                sql = "DELETE FROM PIP_MAT_RECEIVE_SRN WHERE MRV_ID = '" + mrv_id + "'";
                WebTools.ExeSql(sql);
                sql = "DELETE FROM PIP_MAT_RECEIVE WHERE MAT_RCV_ID = '" + mrv_id + "'";
                WebTools.ExeSql(sql);
            }
            Master.ShowWarn(ex.Message);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage  = "MRV Import <br/>";
         Master.HeadingMessage += WebTools.GetExpr("MAT_RCV_NO", "PIP_MAT_RECEIVE", " WHERE MAT_RCV_ID='" + Request.QueryString["MAT_RCV_ID"] + "'");
         HiddenPOID.Value       = WebTools.GetExpr("PO_ID", "PIP_MAT_RECEIVE", " WHERE MAT_RCV_ID='" + Request.QueryString["MAT_RCV_ID"] + "'");
         //Master.HeadingMessage += ")";
     }
 }
    protected void SetPPCSRunning()
    {
        string status = WebTools.GetExpr("CURRENT_STATUS", "PROJECT_JOB_LIST", " PROCESS_NAME = 'IMPORT_PO_DATA'");

        if (status == "RUNNING")
        {
            menuUpdPOLink.Items[0].Text    = "Processing";
            menuUpdPOLink.Items[0].Enabled = false;
        }
    }
Ejemplo n.º 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage  = "Material Requisition<br/>";
            Master.HeadingMessage += WebTools.GetExpr("MR_NO", "PIP_MAT_REQUISITION", " MR_ID='" + Request.QueryString["MR_ID"] + "'");

            Master.AddModalPopup("~/Material/MRItemAdd.aspx?MR_ID=" + Request.QueryString["MR_ID"], btnAdd.ClientID, 450, 650);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Master.HeadingMessage  = "Material Substitution Request<br/>";
         Master.HeadingMessage += WebTools.GetExpr("REQ_NO", "PIP_MAT_SUBSTITUTE", " REQ_ID='" + Request.QueryString["REQ_ID"].ToString() + "'");
         Master.AddModalPopup("~/Material/MaterialSubstitutionItemNew.aspx?REQ_ID=" + Request.QueryString["REQ_ID"], btnAdd.ClientID, 450, 650);
         Master.RadGridList = itemsGridDetail.ClientID;
     }
 }
Ejemplo n.º 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string heading = "Add Contact Detail - ";
            heading += WebTools.GetExpr("VENDOR_NAME", "VENDOR_MASTER", " VENDOR_ID='" + Request.QueryString["Arg1"] + "'");

            Master.HeadingMessage(heading);
        }
    }
Ejemplo n.º 20
0
    protected void ddlSubcon_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e)
    {
        string job_code = WebTools.GetExpr("JOB_CODE", "PROJECT_INFORMATION", " PROJECT_ID ='" + Session["PROJECT_ID"].ToString() + "'");
        string prefix   = job_code + "-MRIR-" + WebTools.GetExpr("SHORT_NAME", "SUB_CONTRACTOR", " SUB_CON_ID='" + ddlSubcon.SelectedValue + "'");

        prefix        = prefix + "-";
        txtMIRNo.Text = WebTools.NextSerialNo("PRC_MAT_INSP", "MIR_NO", prefix, 4, " WHERE MRIR_SC_ID='" + ddlSubcon.SelectedValue + "'");

        ddlMRVList.DataBind();
    }
Ejemplo n.º 21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.HeadingMessage = "Additional Mat - BOM <br/>" +
                                    WebTools.GetExpr("ISSUE_NO", "PIP_MAT_ISSUE_ADD", "ADD_ISSUE_ID=" + Request.QueryString["ADD_ISSUE_ID"]);

            scidField.Value = WebTools.GetExpr("SC_ID", "PIP_MAT_ISSUE_ADD", "ADD_ISSUE_ID=" + Request.QueryString["ADD_ISSUE_ID"]);
        }
    }
Ejemplo n.º 22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string heading = "Add Reserve Items (";
         heading += WebTools.GetExpr("MAT_RES_NO", "MAT_RESERVE", " MAT_RES_ID = '" + Request.QueryString["REQ_ID"] + "'");
         heading += ")";
         Master.HeadingMessage(heading);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string miv_no = WebTools.GetExpr("ISSUE_NO", "PIP_MAT_ISSUE_WO", " WHERE ISSUE_ID=" +
                                             Request.QueryString["ISSUE_ID"]);

            Master.HeadingMessage = "Not in Cutting-Plan <br/>" + miv_no;
        }
    }
    private void set_req_no()
    {
        string prefix = WebTools.GetExpr("JOB_CODE", "PROJECT_INFORMATION", " WHERE PROJECT_ID='" + Session["PROJECT_ID"] + "'");
        string sc_id  = ddFrom.SelectedValue;

        prefix           += "-";
        prefix           += WebTools.GetExpr("SHORT_NAME", "SUB_CONTRACTOR", " WHERE SUB_CON_ID = '" + sc_id + "'");
        prefix           += "-MAT-REQ-";
        txtRequestNo.Text = WebTools.NextSerialNo("MATERIAL_REQUEST", "MAT_REQ_NO", prefix, 4, " PROJECT_ID=" + Session["PROJECT_ID"].ToString() + " AND REQ_FROM='" + ddFrom.SelectedValue + "'");
    }
    protected void SerialNumber(string store_id)
    {
        string sc_id  = WebTools.GetExpr("SC_ID", "STORES_DEF", " WHERE STORE_ID=" + store_id);
        string prefix = WebTools.GetExpr("JOB_CODE", "PROJECT_INFORMATION", " WHERE PROJECT_ID='" + Session["PROJECT_ID"].ToString() + "'");

        prefix       += "-RFI-";
        prefix       += WebTools.GetExpr("SHORT_NAME", "SUB_CONTRACTOR", " WHERE SUB_CON_ID IN (SELECT SC_ID FROM STORES_DEF WHERE STORE_ID = '" + store_id + "')");
        prefix       += "-";
        txtRFINo.Text = WebTools.NextSerialNo("PIP_MAT_INSP_REQUEST", "RFI_NO", prefix, 4, " WHERE STORE_ID IN (SELECT STORE_ID FROM STORES_DEF WHERE SC_ID=" + sc_id + ")");
    }
Ejemplo n.º 26
0
    protected void txtAutoMatCode_TextChanged(object sender, Telerik.Web.UI.AutoCompleteTextEventArgs e)
    {
        string matcode = txtAutoMatCode.Text;

        if (!string.IsNullOrEmpty(matcode.Trim()))
        {
            string mat_id = WebTools.GetExpr("MAT_ID", "PIP_MAT_STOCK", " WHERE MAT_CODE1 = '" + matcode + "'");
            Response.Redirect("MaterialStock_Recon_A.aspx?MAT_ID=" + mat_id);
        }
    }
Ejemplo n.º 27
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string heading = WebTools.GetExpr("MIR_NO", "PRC_MAT_INSP", " MIR_ID='" + Session["popUp_MIR_ID"].ToString() + "'");
         heading += " : PO Item : ";
         heading += WebTools.GetExpr("PO_ITEM", "PRC_MAT_INSP_DETAIL", " MIR_ITEM_ID='" + Session["popUp_MIR_ITEM_ID"].ToString() + "'");
         Master.HeadingMessage(heading);
     }
 }
Ejemplo n.º 28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string po = WebTools.GetExpr("PO_NO", "PIP_PO", " PO_ID = '" + Session["PO_ID"].ToString() + "'");
         Master.HeadingMessage = "Inspection of Bought Out Items - " + po;
         Master.AddModalPopup("~/Procurement/PO_BoughtOutItemsAdd.aspx", btnAdd.ClientID, 450, 650);
         Master.RadGridList = RadGrid1.ClientID;
     }
 }
Ejemplo n.º 29
0
    protected void ddlSubcon_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e)
    {
        string prefix = WebTools.GetExpr("JOB_CODE", "PROJECT_INFORMATION", " WHERE PROJECT_ID='" + Session["PROJECT_ID"] + "'");
        string sc_id  = ddlSubcon.SelectedValue;

        prefix += "-";
        prefix += WebTools.GetExpr("SHORT_NAME", "SUB_CONTRACTOR", " WHERE SUB_CON_ID = '" + sc_id + "'");
        prefix += "-QRNT-";
        txtQuarantineNo.Text = WebTools.NextSerialNo("PIP_QUARANTINE", "QRNTINE_NO", prefix, 4, " PROJECT_ID=" + Session["PROJECT_ID"].ToString() + " AND SC_ID='" + ddlSubcon.SelectedValue + "'");
    }
Ejemplo n.º 30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string type_id = Request.QueryString["TYPE_ID"];
         string trans   = WebTools.GetExpr("TRANS_TYPE", "TPK_TRANS_TYPE", " WHERE TYPE_ID=" + type_id);
         Master.HeadingMessage(trans);
         set_trans_no();
     }
 }