Esempio n. 1
0
        private int SaveData(string action)
        {
            WorkEntity entity = new WorkEntity();
            int agreementID = SessionManager.AgreementTypeID;
            entity.AgreementTypeID = agreementID;
            if (hdnWorkID.Value != string.Empty)
            {
                entity.WorkID = Convert.ToInt32(hdnWorkID.Value);

            }
            entity.ServicesProvided = rdoServicesProvided.SelectedValue;
            entity.GovernmentMarketingServices = rdoGovernmentMarketingServices.SelectedValue;
            entity.ServiceDescription = txtServiceDescription.Text.Trim();
            entity.Lobbying = rdoLobbying.SelectedValue;
            entity.NonEmpSalesRepresentation = rdoNonEmpSalesRepresentation.SelectedValue;

            bool isFileSaved = upload();
            //hdnWorkID.Value = Convert.ToString(entity.WorkID);

            string fileName = lblFileName.Text;
            string uniqueFileName = hdnFilePath.Value;
            entity.QuoteDocName = fileName;
            entity.QuoteDocUniqueName = uniqueFileName;

            //if (isFileSaved)
            //{
            if (SessionManager.AgreementType == "R" || fileName != string.Empty || action == "S")
            {
                WorkBI work = new WorkBI();
                int workID = work.Insert(entity);
                return workID;
            }

            //}
            return 0;
        }
Esempio n. 2
0
 private void Status()
 {
     Page.Validate("Next");
     WorkBI work = new WorkBI();
     work.InsertStatus((Page.IsValid ? 1 : 0), SessionManager.AgreementTypeID);
 }
Esempio n. 3
0
        private void LoadWorkData(int agreementID)
        {
            WorkBI work = new WorkBI();
            WorkEntity entity = work.Read(agreementID);
            if (entity != null)
            {
                /*Assign Values to controls*/
                hdnWorkID.Value = Convert.ToString(entity.WorkID);
                rdoServicesProvided.SelectedValue = entity.ServicesProvided;
                rdoGovernmentMarketingServices.SelectedValue = entity.GovernmentMarketingServices;
                rdoLobbying.SelectedValue = entity.Lobbying;
                rdoNonEmpSalesRepresentation.SelectedValue = entity.NonEmpSalesRepresentation;

                txtServiceDescription.Text = entity.ServiceDescription;
                lblFileName.Text = entity.QuoteDocName;
                hdnFilePath.Value = entity.QuoteDocUniqueName;
            }
        }