Пример #1
0
        /// <summary>
        /// Load the Contact Drop Down List
        /// </summary>
        private void LoadContactDropDown()
        {
            try
            {
                // Load Contact

                ddlContact.Items.Clear();
                ddlContact.DataSource     = new ContactDL().GetContactList(Convert.ToInt32(hfCompanyID.Value)).Tables[0];
                ddlContact.DataTextField  = "FName";
                ddlContact.DataValueField = "ContactID";
                ddlContact.DataBind();
                ddlContact.Items.Insert(0, "--Select One--");
                ddlContact.Items[0].Value = "";


                ddlReviewedBy.Items.Clear();
                ddlReviewedBy.DataSource     = new EmployeeDL().GetEmployeeListByCompanyID(Convert.ToInt32(hfCompanyID.Value)).Tables[0];
                ddlReviewedBy.DataTextField  = "EmployeeName";
                ddlReviewedBy.DataValueField = "EmployeeID";
                ddlReviewedBy.DataBind();
                ddlReviewedBy.Items.Insert(0, "--Select One--");
                ddlReviewedBy.Items[0].Value = "";

                ddlApprovedBy.Items.Clear();
                ddlApprovedBy.DataSource     = new EmployeeDL().GetEmployeeListByCompanyID(Convert.ToInt32(hfCompanyID.Value)).Tables[0];
                ddlApprovedBy.DataTextField  = "EmployeeName";
                ddlApprovedBy.DataValueField = "EmployeeID";
                ddlApprovedBy.DataBind();
                ddlApprovedBy.Items.Insert(0, "--Select One--");
                ddlApprovedBy.Items[0].Value = "";


                OrderAcceptanceParticularsListDL rlDL = new OrderAcceptanceParticularsListDL();

                gvOrderAcceptanceParticularsList.DataSource = rlDL.GetParticularsList().Tables[0];
                gvOrderAcceptanceParticularsList.DataBind();
            }
            catch (Exception ex)
            {
                ErrorLog.LogErrorMessageToDB("AddEditOrderAcceptanceCheckList.aspx", "", "LoadContactDropDown", ex.Message.ToString(), new ACEConnection());
            }
        }
Пример #2
0
        private void GetOrderAcceptanceCheckListDetails(int OrderAcceptanceCheckListID)
        {
            try
            {
                OrderAcceptanceChecklistDL _currentOrderAcceptanceCheckList = new OrderAcceptanceChecklistDL();
                _currentOrderAcceptanceCheckList.GetOrderAcceptanceCheckListByOrderAcceptanceCheckListID(Convert.ToInt32(hfOrderAcceptanceCheckListID.Value.ToString()));

                ddlContact.SelectedValue = _currentOrderAcceptanceCheckList.ContactID.ToString();
                txtPartDescription.Text  = _currentOrderAcceptanceCheckList.PartDescription;
                txtPONo.Text             = _currentOrderAcceptanceCheckList.PONO;
                txtPODate.Text           = _currentOrderAcceptanceCheckList.PODate.ToString();
                txtPOAmendRef.Text       = _currentOrderAcceptanceCheckList.POAmendRef;
                txtDrawingNo_Issue.Text  = _currentOrderAcceptanceCheckList.DrawingNo_Issue;
                txtQuotationRef.Text     = _currentOrderAcceptanceCheckList.QuotationRef;

                if (_currentOrderAcceptanceCheckList.NatureOfReview.ToString() == "FIRST PURCHASE ORDER")
                {
                    rbFPO.Checked = true;
                }
                if (_currentOrderAcceptanceCheckList.NatureOfReview.ToString() == "REGULAR PURCHASE ORDER")
                {
                    rbRPO.Checked = true;
                }
                if (_currentOrderAcceptanceCheckList.NatureOfReview.ToString() == "AMENDMENTS")
                {
                    rbAmend.Checked = true;
                }


                if (_currentOrderAcceptanceCheckList.CheckForOption1)
                {
                    rbCheck1.Checked = true;
                }
                if (_currentOrderAcceptanceCheckList.CheckForOption2)
                {
                    rbCheck2.Checked = true;
                }
                if (_currentOrderAcceptanceCheckList.CheckForOption3)
                {
                    rbCheck3.Checked = true;
                }
                if (_currentOrderAcceptanceCheckList.CheckForOption4)
                {
                    rbCheck4.Checked = true;
                }

                txtComments.Text = _currentOrderAcceptanceCheckList.Comments;

                if (_currentOrderAcceptanceCheckList.ReviewStatus == "TO BE RESOLVED")
                {
                    rbToBeResolved.Checked = true;
                }
                if (_currentOrderAcceptanceCheckList.ReviewStatus == "NOT TO BE RESOLVED")
                {
                    rbToBeResolved.Checked = true;
                }
                if (_currentOrderAcceptanceCheckList.ReviewStatus == "ACCEPTED")
                {
                    rbToBeResolved.Checked = true;
                }
                if (_currentOrderAcceptanceCheckList.ReviewStatus == "NOT ACCEPTED")
                {
                    rbToBeResolved.Checked = true;
                }

                txtReviewedDate.Text        = _currentOrderAcceptanceCheckList.ReviewedDate.ToString();
                ddlReviewedBy.SelectedValue = _currentOrderAcceptanceCheckList.ReviewedByID.ToString();
                ddlApprovedBy.SelectedValue = _currentOrderAcceptanceCheckList.ApprovedByID.ToString();


                OrderAcceptanceParticularsListDL rlDL = new OrderAcceptanceParticularsListDL();

                gvOrderAcceptanceParticularsList.DataSource = rlDL.GetParticularsList().Tables[0];
                gvOrderAcceptanceParticularsList.DataBind();
            }
            catch (Exception ex)
            {
                ErrorLog.LogErrorMessageToDB("AddEditOrderAcceptanceCheckList.aspx", "", "GetOrderAcceptanceCheckListDetails(int OrderAcceptanceCheckListID)", ex.Message, new ACEConnection());
            }
        }