コード例 #1
0
        protected void GetReceiptHeadByIssueID()
        {
            iPartReceiptClient objService = new iPartReceiptClient();

            try
            {
                PORtGRNHead   ReceiptHead = new PORtGRNHead();
                CustomProfile profile     = CustomProfile.GetProfile();
                ReceiptHead = objService.GetReceiptHeadByIssueID(Convert.ToInt64(Session["PORIssueID"].ToString()), profile.DBConnection._constr);
                if (ReceiptHead != null)
                {
                    //Session["PORIssueID"] = ReceiptHead.ReferenceID.Value.ToString();
                    //GetRequest_n_IssueHeadByIssueID();
                    hdnReceiptID.Value  = ReceiptHead.GRNH_ID.ToString();
                    lblReceiptNo.Text   = ReceiptHead.GRNH_ID.ToString();
                    UC_ReceiptDate.Date = DateTime.Now;
                    if (ReceiptHead.GRN_Date != null)
                    {
                        UC_ReceiptDate.Date = ReceiptHead.GRN_Date;
                    }
                    ddlStatus.SelectedIndex = ddlStatus.Items.IndexOf(ddlStatus.Items.FindByValue(ReceiptHead.StatusID.Value.ToString()));
                    if (ReceiptHead.ReceivedByUserID != 0)
                    {
                        ddlReceivedBy.SelectedIndex = ddlReceivedBy.Items.IndexOf(ddlReceivedBy.Items.FindByValue(ReceiptHead.ReceivedByUserID.Value.ToString()));
                    }
                    txtReceiptRemark.Text  = ReceiptHead.Remark;
                    GridReceipt.DataSource = objService.GetReceiptPartDetailByReceiptID(ReceiptHead.GRNH_ID, Convert.ToInt64(hdnSiteID.Value), Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, "true", profile.DBConnection._constr);
                    GridReceipt.DataBind();
                    divDisabled();
                }
            }
            catch { }
            finally { objService.Close(); }
        }
コード例 #2
0
        public void BindGrid()
        {
            BrilliantWMS.WMSOutbound.iOutboundClient Outbound = new WMSOutbound.iOutboundClient();
            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                if (Session["SOID"] != null)
                {
                    hdnPickUpNo.Value      = Session["SOID"].ToString();
                    GridReceipt.DataSource = Outbound.GetPickUpList(Session["SOID"].ToString(), "", Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr);
                    GridReceipt.DataBind();
                }
                else if (Session["PKUPID"] != null)
                {
                    long pkupId = long.Parse(Session["PKUPID"].ToString());
                    long soID   = Outbound.GetSOIDfromPkUpID(pkupId, profile.DBConnection._constr); hdnPickUpNo.Value = soID.ToString();

                    GridReceipt.DataSource = Outbound.GetPickUpList(soID.ToString(), "", Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr);
                    GridReceipt.DataBind();
                }
                if (Session["SOstate"] != null)
                {
                    if (Session["SOstate"].ToString() == "View")
                    {
                        BtnSequence.Visible = false;
                    }
                }
                else if (Session["PKUPstate"] != null)
                {
                    if (Session["PKUPstate"].ToString() == "View")
                    {
                        BtnSequence.Visible = false;
                    }
                }
                else
                {
                    BtnSequence.Visible = true;
                }

                if (Session["TRID"] != null)
                {
                    GridReceipt.DataSource = Outbound.GetPickUpList("", Session["TRID"].ToString(), Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr);
                    GridReceipt.DataBind();
                    if (Session["TRstate"].ToString() == "View")
                    {
                        BtnSequence.Visible = false;
                    }
                }
            }
            catch { }
            finally { Outbound.Close(); }
        }
コード例 #3
0
        public void BindGrid()
        {
            iInboundClient Inbound = new iInboundClient();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                if (Session["QCID"] != null)
                {
                    //DataSet ds = new DataSet();
                    //ds =
                    if (Session["QCstate"].ToString() == "View")
                    {
                        GridReceipt.Columns[0].Visible = false;
                        long    qcID = long.Parse(Session["QCID"].ToString());
                        DataSet ds   = new DataSet();
                        ds = Inbound.GetSavedPutInListbyQCID(long.Parse(Session["QCID"].ToString()), profile.DBConnection._constr);
                        GridReceipt.DataSource = ds; // Inbound.GetSavedPutInListbyQCID(long.Parse(Session["QCID"].ToString()), profile.DBConnection._constr);
                        GridReceipt.DataBind();
                        hdnPutInNo.Value    = ds.Tables[0].Rows[0]["ID"].ToString();
                        BtnSequence.Visible = false; btnUnpacked.Visible = false;
                    }
                    else
                    {
                        GridReceipt.DataSource = Inbound.GetPutInList(Session["QCID"].ToString(), Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr);
                        GridReceipt.DataBind();
                        BtnSequence.Visible = true; btnUnpacked.Visible = true;
                    }
                }
                else if (Session["TRID"] != null)
                {
                    GridReceipt.DataSource = Inbound.GetPutInListByTRID(long.Parse(Session["TRID"].ToString()), Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr);
                    GridReceipt.DataBind();
                    if (Session["TRstate"].ToString() == "View")
                    {
                        BtnSequence.Visible = false; imgBtnEdit1.Visible = false; btnUnpacked.Visible = false;
                    }
                    else
                    {
                        BtnSequence.Visible = true; imgBtnEdit1.Visible = true; btnUnpacked.Visible = true;
                    }
                }
            }
            catch { }
            finally { Inbound.Close(); }
            //iReceivableClient ReceivableClient = new iReceivableClient();

            //DataSet ds = ReceivableClient.GetTempData();
            //GridReceipt.DataSource = ds;
            //GridReceipt.DataBind();
        }
コード例 #4
0
        protected void GridReceipt_OnRebind(object sender, EventArgs e)
        {
            iPartReceiptClient objService = new iPartReceiptClient();

            try
            {
                GridReceipt.DataSource = null;
                GridReceipt.DataBind();
                CustomProfile profile = CustomProfile.GetProfile();
                if (hdnReceiptID.Value != "0" && hdnReceiptID.Value != "")
                {
                    GridReceipt.DataSource = objService.GetReceiptPartDetailByReceiptID(Convert.ToInt64(hdnReceiptID.Value), Convert.ToInt64(hdnSiteID.Value), Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, "", profile.DBConnection._constr);
                }
                else if (hdnIssueID.Value != "0" && hdnIssueID.Value != "")
                {
                    GridReceipt.DataSource = objService.GetReceiptPartDetailByIssueID(Convert.ToInt64(hdnIssueID.Value), Convert.ToInt64(hdnSiteID.Value), Session.SessionID, profile.Personal.UserID.ToString(), ObjectName, profile.DBConnection._constr);
                }
                GridReceipt.DataBind();
            }
            catch { }
            finally { objService.Close(); }
        }