Ejemplo n.º 1
0
    private void displayDetails()
    {
        if (ViewState[Constant.SESSION_BIDREFNO] != null)
        {
            BidItem                 biditem  = BidItemTransaction.QueryBidItemInfo(connstring, ViewState[Constant.SESSION_BIDREFNO].ToString().Trim());
            CategoryTransaction     category = new CategoryTransaction();
            GroupDeptSecTransaction grp      = new GroupDeptSecTransaction();
            CompanyTransaction      cmp      = new CompanyTransaction();
            IncotermTransaction     inc      = new IncotermTransaction();
            OtherTransaction        dte      = new OtherTransaction();

            lblCompany.Text = cmp.GetCompanyName(connstring, biditem.CompanyId.ToString().Trim());

            lblRequestor.Text             = biditem.Requestor.ToString().Trim();
            lblPRNumber.Text              = biditem.PRRefNo.ToString().Trim();
            lblPRDate.Text                = biditem.PRDate.ToString().Trim();
            lblGroup.Text                 = grp.GetGroupDeptSecNameById(connstring, biditem.GroupDeptSec.ToString().Trim());
            lblBidReferenceNumber.Text    = biditem.BidRefNo.ToString().Trim();
            lblSubCategory.Text           = category.GetCategoryNameById(connstring, biditem.Category.ToString().Trim());
            lblBidSubmissionDeadline.Text = biditem.Deadline.ToString().Trim();
            lblBidItemDescription.Text    = biditem.ItemDescription;
            lblDeliverTo.Text             = biditem.DeliverTo;
            lblIncoterm.Text              = inc.GetIncotermName(connstring, biditem.Incoterm);

            hdBidEventType.Value = biditem.BidStatus.ToString().Trim();

            displayItemDetails();
            displaySuppliers();
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        FormsAuthenticationHelper.AuthenticateUserWithReturnUrl();
        connstring = Client.ConnectionString(HttpContext.Current.Session["clientid"].ToString());
        if (Int32.Parse(Session[Constant.SESSION_USERTYPE].ToString().Trim()) != (int)Constant.USERTYPE.BUYER)
        {
            Response.Redirect("../unauthorizedaccess.aspx");
        }

        if (Request.QueryString["brn"] != null)
        {
            Session[Constant.SESSION_BIDREFNO] = Request.QueryString["brn"].ToString();
        }

        if (!(Page.IsPostBack))
        {
            if (Request.QueryString[Constant.SESSION_BIDREFNO] != null)
            {
                Session[Constant.SESSION_BIDREFNO] = Request.QueryString[Constant.SESSION_BIDREFNO].ToString().Trim();
            }

            if (Session["ORDERBY"] == null)
            {
                Session["ORDERBY"] = "DESC";
            }

            BidItem                 bid      = BidItemTransaction.QueryBidItemInfo(connstring, Session[Constant.SESSION_BIDREFNO].ToString());
            BuyerTransaction        buyer    = new BuyerTransaction();
            CategoryTransaction     category = new CategoryTransaction();
            GroupDeptSecTransaction grp      = new GroupDeptSecTransaction();
            CompanyTransaction      cmp      = new CompanyTransaction();
            VendorTransaction       vnd      = new VendorTransaction();
            IncotermTransaction     inc      = new IncotermTransaction();
            OtherTransaction        obj      = new OtherTransaction();

            lblBidReferenceNumber.Text = bid.BidRefNo.ToString().Trim();

            lblCompany.Text               = cmp.GetCompanyName(connstring, bid.CompanyId.ToString().Trim());
            lblRequestor.Text             = bid.Requestor.ToString().Trim();
            lblPRNumber.Text              = bid.PRRefNo.ToString().Trim();
            lblPRDate.Text                = bid.PRDate.ToString().Trim();
            lblGroup.Text                 = grp.GetGroupDeptSecNameById(connstring, bid.GroupDeptSec.ToString().Trim());
            lblBidRefNo.Text              = bid.BidRefNo.ToString().Trim();
            lblSubCategory.Text           = category.GetCategoryNameById(connstring, bid.Category.ToString().Trim());
            lblBidSubmissionDeadline.Text = bid.Deadline.ToString().Trim();
            lblBidItemDesc.Text           = bid.ItemDescription.ToString().Trim();
            lblDeliverTo.Text             = bid.DeliverTo.ToString().Trim();
            lblIncoterm.Text              = inc.GetIncotermName(connstring, bid.Incoterm.ToString().Trim());

            DisplayDetails();
            Bind();
        }
    }
Ejemplo n.º 3
0
    private void FillBidInfo()
    {// Get bid general details
        CategoryTransaction cat = new CategoryTransaction();
        IncotermTransaction inc = new IncotermTransaction();
        CompanyTransaction  cmp = new CompanyTransaction();
        BidItem             bid = BidItemTransaction.GetBidDetailsByRefNo(hdnBidRefNo.Value.Trim());

        lblCompany.Text               = cmp.GetCompanyName(connstring, bid.CompanyId.ToString().Trim());
        lblCategory.Text              = cat.GetCategoryNameById(bid.Category.ToString().Trim());
        lblBidReferenceNumber.Text    = bid.BidRefNo.ToString();
        lblBidSubmissionDeadline.Text = bid.Deadline;
        lblBidItemDescription.Text    = bid.ItemDescription;
        lblDeliverTo.Text             = bid.DeliverTo;
        lblPreferredIncoterm.Text     = inc.GetIncotermName(connstring, bid.Incoterm);
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        FormsAuthenticationHelper.AuthenticateUserWithReturnUrl();
        connstring = Client.ConnectionString(HttpContext.Current.Session["clientid"].ToString());
        if (Int32.Parse(Session[Constant.SESSION_USERTYPE].ToString().Trim()) != (int)Constant.USERTYPE.BUYER)
        {
            Response.Redirect("../unauthorizedaccess.aspx");
        }

        if (!(Page.IsPostBack))
        {
            Session[Constant.SESSION_COMMENT_TYPE] = "0";
            if (Request.QueryString["BidRefNo"] != null)
            {
                Session["BidRefNo"] = Request.QueryString["BidRefNo"].ToString().Trim();
            }

            BidItem                 bid      = BidItemTransaction.QueryBidItemInfo(connstring, Request.QueryString["BidRefNo"].ToString().Trim());
            BuyerTransaction        buyer    = new BuyerTransaction();
            CategoryTransaction     category = new CategoryTransaction();
            GroupDeptSecTransaction grp      = new GroupDeptSecTransaction();
            CompanyTransaction      cmp      = new CompanyTransaction();
            VendorTransaction       vnd      = new VendorTransaction();
            IncotermTransaction     inc      = new IncotermTransaction();
            OtherTransaction        obj      = new OtherTransaction();

            lblCompany.Text               = cmp.GetCompanyName(connstring, bid.CompanyId.ToString().Trim());
            lblRequestor.Text             = bid.Requestor.ToString().Trim();
            lblPRNumber.Text              = bid.PRRefNo.ToString().Trim();
            lblPRDate.Text                = bid.PRDate.ToString().Trim();
            lblGroup.Text                 = grp.GetGroupDeptSecNameById(connstring, bid.GroupDeptSec.ToString().Trim());
            lblBidRefNo.Text              = bid.BidRefNo.ToString().Trim();
            lblSubCategory.Text           = category.GetCategoryNameById(connstring, bid.Category.ToString().Trim());
            lblBidSubmissionDeadline.Text = bid.Deadline.ToString().Trim();
            lblBidItemDesc.Text           = bid.ItemDescription.ToString().Trim();
            lblDeliverTo.Text             = bid.DeliverTo.ToString().Trim();
            lblIncoterm.Text              = inc.GetIncotermName(connstring, bid.Incoterm.ToString().Trim());

            DataTable dtSuppliers = BidItemTransaction.GetSuppliers(connstring, Session["BidRefNo"].ToString().Trim());
            gvSuppliers.DataSource = dtSuppliers;
            gvSuppliers.DataBind();

            DataTable  dtFileAttachment = new DataTable();
            DataColumn dcol1            = new DataColumn("FILES", typeof(System.String));
            dtFileAttachment.Columns.Add(dcol1);

            string   Files  = bid.FileAttachments;
            string[] Files1 = Files.Split(Convert.ToChar("|"));

            for (int i = 0; i < Files1.Length; i++)
            {
                //Create a new row
                DataRow drow = dtFileAttachment.NewRow();
                drow["FILES"] = Files1[i];
                dtFileAttachment.Rows.Add(drow);
            }

            gvFileAttachments.DataSource = dtFileAttachment;
            gvFileAttachments.DataBind();
        }
    }
Ejemplo n.º 5
0
        private void Display()
        {
            BidItem biditem = BidItemTransaction.QueryBidItemInfo(connstring, ViewState["BidRefNo"].ToString().Trim());
            //BidItemInfo biditem = obj.Query("91000");
            BuyerTransaction        buyer    = new BuyerTransaction();
            CategoryTransaction     category = new CategoryTransaction();
            GroupDeptSecTransaction grp      = new GroupDeptSecTransaction();
            CompanyTransaction      cmp      = new CompanyTransaction();
            IncotermTransaction     inc      = new IncotermTransaction();
            OtherTransaction        dte      = new OtherTransaction();

            lblCompany.Text               = cmp.GetCompanyName(connstring, biditem.CompanyId.ToString().Trim());
            lblRequestorName.Text         = biditem.Requestor.ToString().Trim();
            lblPRNumber.Text              = biditem.PRRefNo.ToString().Trim();
            lblPRDate.Text                = biditem.PRDate.ToString().Trim();
            lblGroupDeptSec.Text          = grp.GetGroupDeptSecNameById(connstring, biditem.GroupDeptSec.ToString().Trim());
            lblBidRefNum.Text             = biditem.BidRefNo.ToString().Trim();
            lblSubCategory.Text           = category.GetCategoryNameById(connstring, biditem.Category.ToString().Trim());
            lblBidSubmissionDeadline.Text = biditem.Deadline.ToString().Trim();
            lblBidItemDescription.Text    = biditem.ItemDescription;
            lblDeliverTo.Text             = biditem.DeliverTo;
            lblIncoterm.Text              = inc.GetIncotermName(connstring, biditem.Incoterm);

            DataTable  dtSuppliers = new DataTable();
            DataColumn dcol        = new DataColumn("SUPPLIER", typeof(System.String));

            dtSuppliers.Columns.Add(dcol);

            string suppliers = biditem.Suppliers;

            /*
             *          if (suppliers != "")
             *      btnSubmit.Enabled = true;
             */
            string[] suppliers1 = suppliers.Split(Convert.ToChar(","));

            for (int i = 0; i < suppliers1.Length; i++)
            {
                //Create a new row
                DataRow drow = dtSuppliers.NewRow();
                drow["SUPPLIER"] = suppliers1[i];
                dtSuppliers.Rows.Add(drow);
            }

            gvSuppliers.DataSource = dtSuppliers;
            gvSuppliers.DataBind();

            DataTable  dtFileAttachment = new DataTable();
            DataColumn dcol1            = new DataColumn("FILES", typeof(System.String));

            dtFileAttachment.Columns.Add(dcol1);

            string Files = biditem.FileAttachments;

            string[] Files1 = Files.Split(Convert.ToChar("|"));

            for (int i = 0; i < Files1.Length; i++)
            {
                //Create a new row
                DataRow drow = dtFileAttachment.NewRow();
                drow["FILES"] = Files1[i];
                dtFileAttachment.Rows.Add(drow);
            }

            gvFileAttachments.DataSource = dtFileAttachment;
            gvFileAttachments.DataBind();
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            FormsAuthenticationHelper.AuthenticateUserWithReturnUrl();
            connstring = Client.ConnectionString(HttpContext.Current.Session["clientid"].ToString());
            if (Int32.Parse(Session[Constant.SESSION_USERTYPE].ToString().Trim()) != (int)Constant.USERTYPE.BUYER)
            {
                Response.Redirect("../unauthorizedaccess.aspx");
            }


            if (!(Page.IsPostBack))
            {
                if (Session["BidRefNo"] != null)
                {
                    hdnBidRefNo.Value = Session["BidRefNo"].ToString().Trim();
                    BidItem                 bid      = BidItemTransaction.QueryBidItemInfo(connstring, hdnBidRefNo.Value.Trim());
                    BuyerTransaction        buyer    = new BuyerTransaction();
                    CategoryTransaction     category = new CategoryTransaction();
                    GroupDeptSecTransaction grp      = new GroupDeptSecTransaction();
                    CompanyTransaction      cmp      = new CompanyTransaction();
                    SupplierTransaction     vnd      = new SupplierTransaction();
                    IncotermTransaction     inc      = new IncotermTransaction();
                    OtherTransaction        dte      = new OtherTransaction();

                    lblCompany.Text               = cmp.GetCompanyName(connstring, bid.CompanyId.ToString().Trim());
                    lblRequestor.Text             = bid.Requestor.ToString().Trim();
                    lblPRNumber.Text              = bid.PRRefNo.ToString().Trim();
                    lblPRDate.Text                = bid.PRDate.ToString().Trim();
                    lblGroup.Text                 = grp.GetGroupDeptSecNameById(connstring, bid.GroupDeptSec.ToString().Trim());
                    lblBidReferenceNo.Text        = bid.BidRefNo.ToString().Trim();
                    lblSubCategory.Text           = category.GetCategoryNameById(connstring, bid.Category.ToString().Trim());
                    lblBidSubmissionDeadline.Text = bid.Deadline.ToString().Trim();
                    lblBidItemDescription.Text    = bid.ItemDescription.ToString().Trim();
                    lblDeliverTo.Text             = bid.DeliverTo.ToString().Trim();
                    lblIncoterm.Text              = inc.GetIncotermName(connstring, bid.Incoterm.ToString().Trim());
                    lblBidRefNo2.Text             = bid.BidRefNo.ToString().Trim();

                    FillBidItemDetails();
                    //no checking because when bids are submitted they have suppliers
                    gvSuppliers.DataSource = BidItemTransaction.GetSuppliers(connstring, hdnBidRefNo.Value.Trim());
                    gvSuppliers.DataBind();

                    //DataTable dtFileAttachment = new DataTable();
                    //DataColumn dcol1 = new DataColumn("FILES", typeof(System.String));
                    //dtFileAttachment.Columns.Add(dcol1);

                    //string Files = bid.FileAttachments;
                    //string[] Files1 = Files.Split(Convert.ToChar("|"));

                    //for (int i = 0; i < Files1.Length; i++)
                    //{
                    //    //Create a new row
                    //    DataRow drow = dtFileAttachment.NewRow();
                    //    drow["FILES"] = Files1[i];
                    //    dtFileAttachment.Rows.Add(drow);
                    //}

                    //gvFileAttachments.DataSource = dtFileAttachment;
                    //gvFileAttachments.DataBind();
                }
                else
                {
                    Response.Redirect("index.aspx");
                }
            }
        }