protected void Page_Load(Object sender, EventArgs e) { if (!IsPostBack) { FillSites(); FillStatus(); Toolbar1.SetUserRights("Consumption", "EntryForm", ""); if (Session["PORConsumptionID"] != null) { if (Session["PORConsumptionID"].ToString() == "0") { WMpageAddNew(); SetDefaultValue(); } else if (Session["PORConsumptionID"].ToString() != "0") { GetConsuptionHead(); } } else if (Session["PORReceiptID"] != null) { if (Session["PORReceiptID"].ToString() != "0") { GetDefaultConsumptionfromRequestHead(); } } } UC_DateConsumption.DateIsRequired(true, "", ""); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FillStatus(); FillSites(); Toolbar1.SetUserRights("GoodsReceipt", "EntryForm", ""); if (Session["PORIssueID"] != null) { //WMpageAddNew(); FillReceiptPartGridByIssueID(Convert.ToInt64(Session["PORIssueID"].ToString())); // GetReceiptHeadByReceiptID(); } else if (Session["PORHQReceiptID"] != null) { if (Session["PORHQReceiptID"].ToString() == "0") { // WMpageAddNew(); } else if (Session["PORHQReceiptID"].ToString() != "0") { GetReceiptHeadByReceiptID(); } } } UCFormHeader1.FormHeaderText = "Transfer From Site"; // UC_ReceiptDate.DateIsRequired(true, "", ""); }
protected void Page_Load(object sender, EventArgs e) { UCFormHeader1.FormHeaderText = "Dispatch"; if (!IsPostBack) { Toolbar1.SetUserRights("MaterialIssue", "EntryForm", ""); if (Session["PORIssueID"] != null) { if (Session["PORIssueID"].ToString() != "0") { GetIssueHead(); } else { //WMpageAddNew(); DisplayRequestData(); } } else if (Session["PORRequestID"] != null) { if (Session["PORRequestID"].ToString() != "0") { DisplayRequestData(); } } //Add by Suresh binddropdown(); gvApprovalRemarkBind(); divVisibility(); } UC_IssueDate.DateIsRequired(true, "", ""); }
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"); }
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"); }
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"); }
private void Button_LoadDot(object sender, RoutedEventArgs e) { if (Toolbar1.IsAncestorOf((DependencyObject)e.Source)) { string content = new TextRange(TextEditor1.Document.ContentStart, TextEditor1.Document.ContentEnd).Text; GraphEditor1.LoadDotString(content); } if (Toolbar2.IsAncestorOf((DependencyObject)e.Source)) { string content = new TextRange(TextEditor2.Document.ContentStart, TextEditor2.Document.ContentEnd).Text; GraphEditor2.LoadDotString(content); } }
private void Button_CopyToOther(object sender, RoutedEventArgs e) { if (Toolbar1.IsAncestorOf((DependencyObject)e.Source)) { Graph g = GraphEditor1.CurrentGraph(); GraphEditor2.LoadGraph(g); } if (Toolbar2.IsAncestorOf((DependencyObject)e.Source)) { Graph g = GraphEditor2.CurrentGraph(); GraphEditor1.LoadGraph(g); } }
//[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); } } }
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"); }
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"); } }
private void Button_SerializeDot(object sender, RoutedEventArgs e) { if (Toolbar1.IsAncestorOf((DependencyObject)e.Source)) { string dot = GraphEditor1.SerializeGraphAsDotString(); TextEditor1.Document.Blocks.Clear(); TextEditor1.Document.Blocks.Add(new Paragraph(new Run(dot))); } if (Toolbar2.IsAncestorOf((DependencyObject)e.Source)) { string dot = GraphEditor2.SerializeGraphAsDotString(); TextEditor2.Document.Blocks.Clear(); TextEditor2.Document.Blocks.Add(new Paragraph(new Run(dot))); } }
/// <summary> /// 控件初始化函数 /// </summary> /// <param name="e">初始化事件参数</param> protected override void OnInit(EventArgs e) { base.OnInit(e); // 初始化工具条 1 this.m_toolbar1 = new Toolbar1(); // 初始化工具条2 this.m_toolbar2 = new Toolbar2(); // <span contenteditable=true></span> this.m_spanDesigner = new Bincess.Components.Web.TextPane.DesignPane(); // <textarea></textarea> this.m_textModel = new Bincess.Components.Web.TextPane.TextModel(); // 添加控件到集合 this.Controls.Add(this.m_textModel); }
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"); }
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 //{ //} } }
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"); }
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"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Toolbar1.SetUserRights("MaterialReceipt", "EntryForm", ""); Toolbar1.SetAddNewRight(false, "Select pending receipt from Receipt Summary to AddNew / Edit Receipt", "../PowerOnRent/Default.aspx?invoker=Receipt"); FillStatus(); if (Session["PORReceiptID"] != null) { GetReceiptHeadByReceiptID(); } else if (Session["PORIssueID"] != null) { GetRequest_n_IssueHeadByIssueID(); } else if (Session["PORRequestID"] != null) { GetRequestHeadByRequestID(); } FillUserList(); } UC_ReceiptDate.DateIsRequired(true, "", ""); }
protected void DisplayRequestData() { iPartRequestClient objService = new iPartRequestClient(); iPartIssueClient objServiceIssue = new iPartIssueClient(); POR_SP_GetRequestByRequestIDs_Result RequestHead = new POR_SP_GetRequestByRequestIDs_Result(); try { CustomProfile profile = CustomProfile.GetProfile(); RequestHead = objService.GetRequestSummayByRequestIDs(Session["PORRequestID"].ToString(), profile.DBConnection._constr).FirstOrDefault(); hdnRequestID.Value = RequestHead.PRH_ID.ToString(); hdnSiteID.Value = RequestHead.SiteID.ToString(); lblRequestNo2.Text = RequestHead.PRH_ID.ToString(); lblRequestNo3.Text = RequestHead.PRH_ID.ToString(); lblSites.Text = RequestHead.SiteName; lblRequestStatus.Text = RequestHead.RequestStatus; lblRequestDate.Text = RequestHead.RequestDate.Value.ToString("dd-MMM-yyyy"); lblRequestType.Text = RequestHead.RequestType; lblRequestedBy.Text = RequestHead.RequestByUserName; if (WMGetIssueSummaryByRequestID() == 0) { FillGrid1ByRequestID(Convert.ToInt64(Session["PORRequestID"].ToString())); HttpContext.Current.Session["PORstate"] = "Add"; HttpContext.Current.Session["PORIssueID"] = "0"; lblIssueNo.Text = "Generate when Save"; ddlStatus.DataSource = WMFillStatus(); ddlStatus.DataBind(); if (ddlStatus.Items.Count > 1) { ddlStatus.SelectedIndex = 1; } FillUserList(1); ddlIssuedBy.SelectedIndex = ddlIssuedBy.Items.IndexOf(ddlIssuedBy.Items.FindByValue(profile.Personal.UserID.ToString())); UC_IssueDate.Date = DateTime.Now; UC_ShippingDate.Date = DateTime.Now; UC_ExpDeliveryDate.Date = DateTime.Now; } else { FillUserList(1); ddlIssuedBy.SelectedIndex = ddlIssuedBy.Items.IndexOf(ddlIssuedBy.Items.FindByValue(profile.Personal.UserID.ToString())); //add by suresh ddlStatus.DataSource = WMFillStatus(); ddlStatus.DataBind(); UC_IssueDate.Date = DateTime.Now; UC_ShippingDate.Date = DateTime.Now; UC_ExpDeliveryDate.Date = DateTime.Now; } bool AddNewAccess = false; AddNewAccess = objServiceIssue.CheckPendingIssueListToDecideAddNewAccess(RequestHead.PRH_ID, profile.DBConnection._constr); if (Toolbar1.GetUserRightsByObjectName("MaterialIssue", "", "").Add == true) { if (AddNewAccess == false) { Toolbar1.SetAddNewRight(false, "Here is no pending issue against current request", "#"); } } } catch { } finally { objService.Close(); } }
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"); }
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; } }