コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         fillWarehouse();
         if (Session["TRID"] != null)
         {
             if (Session["TRID"].ToString() != "0" && Session["TRstate"].ToString() == "View")
             {
                 state = "View";
                 GetTransferDetails(Session["TRID"].ToString());
             }
             else if (Session["TRID"].ToString() == "0" && Session["TRstate"].ToString() == "Add")
             {
                 state = "Add";
                 fillUser();
                 WMpageAddNew();
                 ddlWTWStatus.DataSource = WMFillStatus();
                 ddlWTWStatus.DataBind();
                 UCWTWTransferDate.Date = DateTime.Now;
                 UC_ShippingDate.Date   = DateTime.Now;
                 UCExpDeliveryDate.Date = DateTime.Now;
             }
         }
     }
     Toolbar1.SetAddNewRight(false, "Not Allowed");
     Toolbar1.SetEditRight(false, "Not Allowed");
     Toolbar1.SetSaveRight(true, "Not Allowed");
     Toolbar1.SetClearRight(false, "Not Allowed");
     Toolbar1.SetImportRight(false, "Not Allowed");
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            bindgrid();
            Toolbar1.SetUserRights("MaterialRequest", "Summary", "");

            Toolbar1.SetSaveRight(false, "Not Allowed");
            Toolbar1.SetClearRight(false, "Not Allowed");
            Toolbar1.SetImportRight(false, "Not Allowed");
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BindReturnGrid();
            Toolbar1.SetUserRights("MaterialRequest", "EntryForm", "");

            Toolbar1.SetAddNewRight(true, "Not Allowed");
            Toolbar1.SetSaveRight(false, "Not Allowed");
            Toolbar1.SetClearRight(false, "Not Allowed");
            Toolbar1.SetImportRight(true, "Not Allowed");
        }
コード例 #4
0
        //[WebMethod]
        //public static string WMSaveReceiptHead(object objReceipt)
        //{
        //    string result = "";
        //    iHQGoodsReceiptClient objService = new iHQGoodsReceiptClient();
        //    try
        //    {
        //        CustomProfile profile = CustomProfile.GetProfile();

        //        PORtGRNHead ReceiptHead = new PORtGRNHead();
        //        Dictionary<string, object> dictionary = new Dictionary<string, object>();
        //        dictionary = (Dictionary<string, object>)objReceipt;

        //        if (HttpContext.Current.Session["PORHQReceiptID"] != null)
        //        {
        //            if (HttpContext.Current.Session["PORHQReceiptID"] == "0")
        //            {
        //                ReceiptHead.CreatedBy = profile.Personal.UserID;
        //                ReceiptHead.CreationDt = DateTime.Now;
        //            }
        //            else
        //            {
        //                ReceiptHead = objService.GetReceiptHeadByReceiptID(Convert.ToInt64(HttpContext.Current.Session["PORHQReceiptID"]), profile.DBConnection._constr);
        //                ReceiptHead.LastModifiedBy = profile.Personal.UserID;
        //                ReceiptHead.LastModifiedDt = DateTime.Now;
        //            }

        //            ReceiptHead.SiteID = Convert.ToInt64(dictionary["SiteID"]);
        //            ReceiptHead.ObjectName = dictionary["ObjectName"].ToString();
        //            ReceiptHead.ReferenceID = Convert.ToInt64(dictionary["ReferenceID"].ToString());
        //            ReceiptHead.GRN_No = "N/A";
        //            ReceiptHead.GRN_Date = Convert.ToDateTime(dictionary["GRN_Date"].ToString());
        //            ReceiptHead.ReceivedByUserID = Convert.ToInt64(dictionary["ReceivedByUserID"]);
        //            ReceiptHead.StatusID = Convert.ToInt64(dictionary["StatusID"]);
        //            ReceiptHead.Remark = dictionary["Remark"].ToString();

        //            /**/
        //            ReceiptHead.ChallanNo = dictionary["ChallanNo"].ToString();
        //            if (dictionary["ChallanDate"].ToString() != "") ReceiptHead.ChallanDate = Convert.ToDateTime(dictionary["ChallanDate"].ToString());
        //            ReceiptHead.Vendor = dictionary["Vendor"].ToString();

        //            ReceiptHead.IsSubmit = Convert.ToBoolean(dictionary["IsSubmit"]);

        //            long ReceiptID = objService.SetIntoGRNHead(ReceiptHead, profile.DBConnection._constr);

        //            if (ReceiptID > 0)
        //            {
        //                objService.FinalSaveReceiptPartDetail(HttpContext.Current.Session.SessionID, ObjectName, ReceiptID, profile.Personal.UserID.ToString(), profile.DBConnection._constr);
        //                result = "HQ's Material Receipt record saved successfully";
        //                HttpContext.Current.Session.Remove("PORIssueID");
        //            }
        //        }
        //    }
        //    catch { result = "Some error occurred"; }
        //    finally { objService.Close(); }
        //    return result;
        //}

        protected void divDisabled()
        {
            if (ddlStatus.Items.Count > 0)
            {
                if (Convert.ToInt32(ddlStatus.SelectedItem.Value) > 1)
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "changemodeIssue" + Session.SessionID, "changemode(true, 'divReceiptDetail');changemode(true, 'divPODetail')", true);
                    Toolbar1.SetSaveRight(false, "Not Allowed");
                    Toolbar1.SetClearRight(false, "Not Allowed");
                }
                //else { ScriptManager.RegisterStartupScript(this, this.GetType(), "changemodeIssue" + Session.SessionID, "changemode(false, 'divReceiptDetail');changemode(false, 'divPODetail')", true); }
            }
        }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PreviousPOID = long.Parse(Request.QueryString["POID"]);
                BindGrid();
                Toolbar1.SetUserRights("MaterialRequest", "Summary", "");
            }

            Toolbar1.SetAddNewRight(false, "Not Allowed");
            Toolbar1.SetSaveRight(false, "Not Allowed");
            Toolbar1.SetClearRight(false, "Not Allowed");
            Toolbar1.SetImportRight(false, "Not Allowed");
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UCFormHeader1.FormHeaderText = "Shipping";

            if (!IsPostBack)
            {
                BindGrid();

                Toolbar1.SetUserRights("MaterialRequest", "EntryForm", "");
                Toolbar1.SetSaveRight(false, "Not Allowed");
                Toolbar1.SetAddNewRight(false, "Not Allowed");
                Toolbar1.SetImportRight(false, "Not Allowed");
                Toolbar1.SetClearRight(false, "Not Allowed");
            }
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UCFormHeader1.FormHeaderText = "Purchase Orders";
            BindPOGrid(sender, e);
            if (!IsPostBack)
            {
                Toolbar1.SetUserRights("MaterialRequest", "EntryForm", "");

                BindPOGrid(sender, e);
            }

            //Add By Suresh
            Toolbar1.SetAddNewRight(false, "Not Allowed");
            Toolbar1.SetSaveRight(false, "Not Allowed");
            Toolbar1.SetClearRight(false, "Not Allowed");
            Toolbar1.SetImportRight(false, "Not Allowed");
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UCFormHeader1.FormHeaderText = "Sales Orders";
            BindSOGrid(sender, e);
            if (!IsPostBack)
            {
                Toolbar1.SetUserRights("MaterialRequest", "EntryForm", "");

                BindSOGrid(sender, e);
            }
            //dsvalue = int.Parse(hdndsvalue.Value.ToString());
            //Add By Suresh
            Toolbar1.SetAddNewRight(false, "Not Allowed");
            Toolbar1.SetSaveRight(false, "Not Allowed");
            Toolbar1.SetClearRight(false, "Not Allowed");
            Toolbar1.SetImportRight(false, "Not Allowed");
        }
コード例 #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UCFormHeader1.FormHeaderText = "Receiving";

            if (!IsPostBack)
            {
                BindGrid();

                Toolbar1.SetUserRights("MaterialRequest", "EntryForm", "");
                Toolbar1.SetSaveRight(false, "Not Allowed");
                Toolbar1.SetAddNewRight(false, "Not Allowed");
                Toolbar1.SetImportRight(false, "Not Allowed");
                Toolbar1.SetClearRight(false, "Not Allowed");
                //try
                //{
                //    if ((Request.QueryString["PO"] != "") || (Request.QueryString["PO"] != null))
                //    {
                //       // iPurchaseOrderClient ShipClient = new iPurchaseOrderClient();
                //        //ShipClient.ClearTempData();
                //        SelectedPO = Request.QueryString["PO"].ToString();
                //        SelectedPOs.Value = SelectedPO;
                //        Fill_SortCode();
                //        CreateGrid();
                //        int a = ValidateStatus(SelectedPO);
                //        if (a == 0)
                //        {
                //            Button1.Enabled = false;
                //            BtnClearGrid.Enabled = false;
                //            BtnSequence.Enabled = false;
                //            ddlLocation.Enabled = false;
                //            ddlPoList.Enabled = false;
                //            txtReceiQty.Enabled = false;
                //            //iReceivableClient ReceivableClient = new iReceivableClient();
                //            //ds = ReceivableClient.DisplayGrid(SelectedPO);
                //            GridReceipt.DataSource = ds;
                //            GridReceipt.DataBind();
                //           // ReceivableClient.Close();
                //        }
                //        ShowPODetails(SelectedPOs.Value);
                //    }
                //}
                //catch
                //{
                //}
            }
        }
コード例 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["ASNID"] != null)
            {
                long asnID = long.Parse(Session["ASNID"].ToString());
                GetASNDetail(asnID);
            }
            else
            {
            }
            Toolbar1.SetUserRights("MaterialRequest", "Summary", "");

            Toolbar1.SetAddNewRight(true, "Not Allowed");
            Toolbar1.SetSaveRight(false, "Not Allowed");
            Toolbar1.SetClearRight(false, "Not Allowed");
            Toolbar1.SetImportRight(true, "Not Allowed");
        }
コード例 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["invoker"].ToString() == "Request")
            {
                h4DivHead.InnerText          = " Request";
                UCFormHeader1.FormHeaderText = "Request";
                //  iframePOR.Attributes.Add("src", "../PowerOnRent/GridRequestSummary.aspx?FillBy=UserID");
                iframePOR.Attributes.Add("src", "../PowerOnRent/GridRequestSummary.aspx?FillBy=UserID&Invoker=Request");
                Toolbar1.SetUserRights("MaterialRequest", "Summary", "");
                btnDriver.Visible      = false;
                btnCancelOrder.Visible = true;
            }
            else if (Request.QueryString["invoker"].ToString() == "Approval")
            {
                h4DivHead.InnerText          = " Approvals ";
                UCFormHeader1.FormHeaderText = "Approvals";
                iframePOR.Attributes.Add("src", "../PowerOnRent/GridRequestSummary.aspx?FillBy=UserID&Invoker=Request");
                Toolbar1.SetUserRights("MaterialRequest", "Summary", "");
                Toolbar1.SetAddNewRight(false, "Click on pending Approved record [Red box] to Add New / Edit Issue");
                btnDriver.Visible      = false;
                btnCancelOrder.Visible = false;
            }
            else if (Request.QueryString["invoker"].ToString() == "Issue")
            {
                h4DivHead.InnerText          = " Dispatch";
                UCFormHeader1.FormHeaderText = "Dispatch";
                //iframePOR.Attributes.Add("src", "../PowerOnRent/GridIssueSummary.aspx?FillBy=UserID");
                iframePOR.Attributes.Add("src", "../PowerOnRent/GridRequestSummary.aspx?FillBy=UserID&Invoker=Issue");
                Toolbar1.SetUserRights("MaterialIssue", "Summary", "");
                Toolbar1.SetAddNewRight(false, "Click on pending Issue record [Red box] to Add New / Edit Issue");
                btnDriver.Visible      = true;
                btnCancelOrder.Visible = false;
            }
            else if (Request.QueryString["invoker"].ToString() == "Receipt")
            {
                h4DivHead.InnerText          = "List of Material Receipts";
                UCFormHeader1.FormHeaderText = "Material Receipts";
                iframePOR.Attributes.Add("src", "../PowerOnRent/GridReceiptSummary.aspx?FillBy=UserID");
                Toolbar1.SetUserRights("MaterialReceipt", "Summary", "");
                Toolbar1.SetAddNewRight(false, "Click on pending Receipt record [Red box] to Add New / Edit Receipt");
            }
            else if (Request.QueryString["invoker"].ToString() == "Consumption")
            {
                h4DivHead.InnerText          = "List of Consumption";
                UCFormHeader1.FormHeaderText = "Consumption";
                iframePOR.Attributes.Add("src", "../PowerOnRent/GridConsumptionSummary.aspx?FillBy=UserID");
                Toolbar1.SetUserRights("Consumption", "Summary", "");
            }
            else if (Request.QueryString["invoker"].ToString() == "HQReceipt")
            {
                h4DivHead.InnerText          = "List of Goods Receipts [HQ]";
                UCFormHeader1.FormHeaderText = "Goods Receipts [HQ]";
                iframePOR.Attributes.Add("src", "../PowerOnRent/GridHQReceiptSummary.aspx?FillBy=UserID");
                Toolbar1.SetUserRights("GoodsReceipt", "Summary", "");
            }

            Toolbar1.SetSaveRight(false, "Not Allowed");
            Toolbar1.SetClearRight(false, "Not Allowed");
            if (Session["Lang"] == "")
            {
                Session["Lang"] = Request.UserLanguages[0];
            }
            loadstring();
            if (!IsPostBack)
            {
                //Button btnExport = (Button)Toolbar1.FindControl("btnExport");
                //btnExport.Visible = false;
                //Button btnImport = (Button)Toolbar1.FindControl("btnImport");
                //btnImport.Visible = false;
                //Button btmMail = (Button)Toolbar1.FindControl("btmMail");
                //btmMail.Visible = false;
                //Button btnPrint = (Button)Toolbar1.FindControl("btnPrint");
                //btnPrint.Visible = false;
            }
        }
コード例 #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["QCID"] != null)
         {
             if (Session["QCID"].ToString() != "0" && Session["QCstate"].ToString() == "View")
             {
                 state = "View";
                 GetDispatchDetails(Session["QCID"].ToString());
             }
             else if (Session["QCID"].ToString() != "0" && Session["QCstate"].ToString() == "Edit")
             {
                 state = "Edit";
                 fillUser();
                 ddlStatus.DataSource = WMFillStatus();
                 ddlStatus.DataBind();
                 UCDispatchDate.Date    = DateTime.Now;
                 UC_ShippingDate.Date   = DateTime.Now;
                 UCExpDeliveryDate.Date = DateTime.Now;
                 if (Session["QCID"].ToString() != "0")
                 {
                     DisplaySOData();
                 }
             }
         }
         else if (Session["DispID"] != null)
         {
             if (Session["DispID"].ToString() != "0" && Session["Dispstate"].ToString() == "View")
             {
                 state = "View";
                 GetDispatchDetails(Session["DispID"].ToString());
             }
         }
         else if (Session["TRID"] != null)
         {
             if (Session["TRID"].ToString() != "0" && Session["TRstate"].ToString() == "View")
             {
                 state = "View";
                 GetDispatchDetails(Session["TRID"].ToString());
             }
             else if (Session["TRID"].ToString() != "0" && Session["TRstate"].ToString() == "Edit")
             {
                 state = "Edit";
                 fillUser();
                 ddlStatus.DataSource = WMFillStatus();
                 ddlStatus.DataBind();
                 UCDispatchDate.Date    = DateTime.Now;
                 UC_ShippingDate.Date   = DateTime.Now;
                 UCExpDeliveryDate.Date = DateTime.Now;
                 if (Session["TRID"].ToString() != "0")
                 {
                     DisplaySOData();
                 }
             }
         }
     }
     Toolbar1.SetAddNewRight(false, "Not Allowed");
     Toolbar1.SetEditRight(false, "Not Allowed");
     if (state != "View")
     {
         Toolbar1.SetSaveRight(true, "Not Allowed");
     }
     else
     {
         Toolbar1.SetSaveRight(false, "Not Allowed");
     }
     Toolbar1.SetClearRight(false, "Not Allowed");
     Toolbar1.SetImportRight(false, "Not Allowed");
 }