public HttpResponseMessage SaveSCRSCTeam(SCTeam_SupplyChainViewModel sCTeam_SupplyChainViewModel)
        {
            OperationResultViewModel operationResult = new OperationResultViewModel();

            try
            {
                int requestId = Convert.ToInt32(sCTeam_SupplyChainViewModel.requestId);
                int result    = 0;

                if (Convert.ToInt32(sCTeam_SupplyChainViewModel.GetRQTY) == 4)
                {
                    result = sCTeam_SupplyChainService.SaveSCPData(requestId, sCTeam_SupplyChainViewModel);
                }

                else
                {
                    result = sCTeam_SupplyChainService.SaveCombiData(requestId, sCTeam_SupplyChainViewModel);
                }
                if (result > 0)
                {
                    operationResult.ResultCode = Enums.OperationResultCode.Success;
                    operationResult.ResultMsg  = Constants.OPERATION_SAVE_SUCC;
                }
                else
                {
                    operationResult.ResultCode = Enums.OperationResultCode.Failed;
                    operationResult.ResultMsg  = Constants.OPERATION_SAVE_FAILED;
                }
            }
            catch (Exception ex)
            {
                NameValueCollection additionalInfo = new NameValueCollection();
                additionalInfo.Add("PageName", "SCTeam_SupplyChain");
                ExceptionManager.Publish(ex, additionalInfo);
                operationResult.ResultCode = Enums.OperationResultCode.Failed;
                operationResult.ResultMsg  = ex.Message;
            }
            return(Request.CreateResponse(HttpStatusCode.OK, operationResult));
        }
        public HttpResponseMessage GetSCRSCTeam(int requestId)
        {
            try
            {
                sCTeam_SupplyChainViewModel           = sCTeam_SupplyChainService.GetSCPRequestDetails(requestId);
                sCTeam_SupplyChainViewModel.requestId = requestId.ToString();
                sCTeam_SupplyChainViewModel.username  = UserName.Split(Syngenta.ERMS.Common.Constants.SLASH.ToCharArray())[1].ToString();
                if (HttpContext.Current.Session["ifshow"] != null && HttpContext.Current.Session["ifshow"].ToString() == "Yes")
                {
                    sCTeam_SupplyChainViewModel.message1Show = true;
                }
                if (((HttpContext.Current.Session[Constants.SESSION_USER_ROLE].ToString().ToUpper()) == "ADMIN"))
                {
                    sCTeam_SupplyChainViewModel.ResolutionCommentsReadOnly = false;
                    sCTeam_SupplyChainViewModel.SaveDisabled    = false;
                    sCTeam_SupplyChainViewModel.OutComeDisabled = false;
                }
                else
                {
                    sCTeam_SupplyChainViewModel.ResolutionCommentsReadOnly = true;
                    sCTeam_SupplyChainViewModel.SaveDisabled    = true;
                    sCTeam_SupplyChainViewModel.OutComeDisabled = true;
                }
                BaseService baseService = new BaseService();
                if (baseService.GetOrigitorName(requestId).Rows[0]["Origitor"].ToString().ToUpper() == UserName.ToUpper() || ((HttpContext.Current.Session[Constants.SESSION_USER_ROLE].ToString().ToUpper()) == "ADMIN") || sCTeam_SupplyChainViewModel.GetPackTechList.ToUpper().Contains(UserName.ToUpper()))
                {
                    //do nothing
                }
                else
                {
                    DisableControls();
                }
                PackagingDisableControls();
                FAndPSourcingDisableControls();
                PackPurchasingDisableControls();
                GSCMDisableControls();
                GTPDisableControls();
                string hdnStatus = sCTeam_SupplyChainViewModel.GetStatus;
                if (base.PageDisable("SCT_SC", Convert.ToInt32(hdnStatus)) == 1)
                {
                    DisableControls();
                }


                string hdnType = string.IsNullOrEmpty(sCTeam_SupplyChainViewModel.GetRQTY) ? string.Empty : sCTeam_SupplyChainViewModel.GetRQTY;
                if (Convert.ToInt32(hdnType) == 4)
                {
                    sCTeam_SupplyChainViewModel.DataManageShow       = false;
                    sCTeam_SupplyChainViewModel.GSCMShow             = false;
                    sCTeam_SupplyChainViewModel.FPComPlantShow       = false;
                    sCTeam_SupplyChainViewModel.GTPShow              = false;
                    sCTeam_SupplyChainViewModel.PackTechnologistShow = true;
                }
                else
                {
                    sCTeam_SupplyChainViewModel.GSCMShow             = true;
                    sCTeam_SupplyChainViewModel.FPComPlantShow       = true;
                    sCTeam_SupplyChainViewModel.GTPShow              = true;
                    sCTeam_SupplyChainViewModel.DataManageShow       = false;
                    sCTeam_SupplyChainViewModel.PackTechnologistShow = false;
                }
                return(Request.CreateResponse(HttpStatusCode.OK, sCTeam_SupplyChainViewModel));
            }
            catch (Exception ex)
            {
                NameValueCollection additionalInfo = new NameValueCollection();
                additionalInfo.Add("PageName", "SCTeam_SupplyChain");
                ExceptionManager.Publish(ex, additionalInfo);
                //Message = errMessages.GetString("Error in GetSCRSCTeam method of SCTeam_SupplyChain controller");
                errEntity.ErrorNumber = 420;
                errEntity.ErrorMess   = "Error in GetSCRSCTeam method of SCTeam_SupplyChain controller";
                sCTeam_SupplyChainViewModel.ErrorBE = errEntity;
                return(Request.CreateResponse(HttpStatusCode.OK, sCTeam_SupplyChainViewModel));
            }
        }