public ActionResult Index()
        {
            QuaterGenerator.UpdateActiveQuaters();
            FinanceToolEntities financetoolentities = new FinanceToolEntities();
            var PMOGriddetails = financetoolentities.Usp_GetPMOOpportunityDetails().ToList();

            return(View(PMOGriddetails));
        }
Beispiel #2
0
        public List <DUHMainDetailsResult> Get_SDU_DU_ALL_OldData()
        {
            QuaterGenerator.UpdateActiveQuaters();
            var DUHGriddetails = financetoolentities.Usp_GetDUHDetails_Comparision_OldDetails("ALL", "ALL", DateTime.Now).ToList();
            // var DUHGriddetails = financetoolentities.Usp_GetDUHMainDetails().ToList();
            int             Iteration          = 0;
            CompareDUHModel objcompareDUHModel = new CompareDUHModel();

            List <DUHMainDetailsResult> DUHMainDetailsResultList = new List <DUHMainDetailsResult>();

            foreach (var DUHdbvalues in DUHGriddetails)
            {
                DUHMainDetailsResult duhmaindetail = new DUHMainDetailsResult();
                duhmaindetail.AMID               = DUHdbvalues.AMID;
                duhmaindetail.AMName             = DUHdbvalues.AMName;
                duhmaindetail.CustomerID         = DUHdbvalues.CustomerID;
                duhmaindetail.Customername       = DUHdbvalues.Customername;
                duhmaindetail.DBBLDU             = DUHdbvalues.DBBLDU;
                duhmaindetail.DBBLDUID           = DUHdbvalues.DBBLDUID;
                duhmaindetail.DealStageID        = DUHdbvalues.DealStageID;
                duhmaindetail.DUID               = DUHdbvalues.DUID;
                duhmaindetail.DUName             = DUHdbvalues.DUName;
                duhmaindetail.LOBID              = DUHdbvalues.LOBID;
                duhmaindetail.LOBName            = DUHdbvalues.LOBName;
                duhmaindetail.Note               = DUHdbvalues.Note;
                duhmaindetail.OpportunityID      = DUHdbvalues.OpportunityID;
                duhmaindetail.OpportunityKeyID   = DUHdbvalues.OpportunityKeyID;
                duhmaindetail.OpportunityLobId   = DUHdbvalues.OpportunityLobId;
                duhmaindetail.OpportunityLobName = DUHdbvalues.OpportunityLobName;
                duhmaindetail.OpportunityName    = DUHdbvalues.OpportunityName;
                duhmaindetail.poavilable         = DUHdbvalues.poavilable;
                duhmaindetail.pobalance          = DUHdbvalues.pobalance;
                duhmaindetail.ProductGroup       = DUHdbvalues.ProductGroup;
                duhmaindetail.ProductGroupID     = DUHdbvalues.ProductGroupID;
                duhmaindetail.ProgramName        = DUHdbvalues.ProgramName;
                duhmaindetail.ProjectID          = DUHdbvalues.ProjectID;
                duhmaindetail.ProjectName        = DUHdbvalues.ProjectName;
                duhmaindetail.SDUID              = DUHdbvalues.SDUID;
                duhmaindetail.ServiceLine        = DUHdbvalues.ServiceLine;
                duhmaindetail.ServiceLineID      = DUHdbvalues.ServiceLineID;
                //duhmaindetail.SowStatus = DUHdbvalues.SOWStatus1;
                //duhmaindetail.S_No = DUHdbvalues.S_No;
                List <string> Objquater  = new List <string>();
                List <string> QuaterName = new List <string>();
                List <string> Operations = new List <string>();
                Operations.Add("_FC");
                var dbQuaterlist        = financetoolentities.Quaters.Where(i => i.IsActive == true).ToList();
                var dbQuater_Actuallist = financetoolentities.quater_Actual.Where(i => i.IsActive == true).ToList();
                foreach (var quater in dbQuaterlist)
                {
                    foreach (var Obj in Operations)
                    {
                        var value        = DUHdbvalues.GetType().GetProperty(quater.QuaterName + Obj);
                        var Quartervalue = value.GetValue(DUHdbvalues, null).ToString();
                        var qvalue       = MyCustomFormat(Convert.ToDouble(Quartervalue));
                        Objquater.Add(qvalue);
                    }
                    QuaterName.Add(quater.QuaterName + "_FC($K)");
                    // QuaterName.Add(quater.QuaterName + "_ACT($K)");
                }
                Operations.Clear();
                Operations.Add("_ACT");
                foreach (var quater in dbQuater_Actuallist)
                {
                    foreach (var Obj in Operations)
                    {
                        var value        = DUHdbvalues.GetType().GetProperty(quater.QuaterName + Obj);
                        var Quartervalue = value.GetValue(DUHdbvalues, null).ToString();
                        var qvalue       = MyCustomFormat(Convert.ToDouble(Quartervalue));
                        Objquater.Add(qvalue);
                    }
                    //QuaterName.Add(quater.QuaterName + "_FC($K)");
                    QuaterName.Add(quater.QuaterName + "_ACT($K)");
                }

                if (Iteration == 0)
                {
                    duhmaindetail.QuaterName = QuaterName;
                }
                duhmaindetail.Quaterlist = Objquater;
                DUHMainDetailsResultList.Add(duhmaindetail);
                Iteration++;
            }
            return(DUHMainDetailsResultList);
        }
Beispiel #3
0
        public ActionResult DisplayAmDetails()
        {
            QuaterGenerator.UpdateActiveQuaters();
            var AmDetailsModel = financetoolentities.Usp_GetAdminMainDetails_V2().Where(i => i.IsUpdated == false).ToList();
            List <AdminMainDetailsResult> _AdminMainResult = new List <AdminMainDetailsResult>();
            int Iteration = 0;

            foreach (var AmResult in AmDetailsModel)
            {
                AdminMainDetailsResult obj = new AdminMainDetailsResult();
                obj.acv    = AmResult.acv;
                obj.AMID   = Convert.ToInt16(AmResult.AMID);
                obj.AMName = AmResult.AMName;

                obj.BillingStratDate   = AmResult.BillingStratDate;
                obj.CustomerID         = AmResult.CustomerID;
                obj.Customername       = AmResult.Customername;
                obj.DBBLDU             = AmResult.DBBLDU;
                obj.DBBLDUID           = Convert.ToInt16(AmResult.DBBLDUID);
                obj.DealStagestatus    = AmResult.DealStagestatus;
                obj.DUID               = AmResult.DUID;
                obj.DUName             = AmResult.DUName;
                obj.IsActive           = AmResult.IsActive;
                obj.LOBID              = Convert.ToInt16(AmResult.LOBID);
                obj.LOBName            = AmResult.LOBName;
                obj.note               = AmResult.note;
                obj.OpportunityID      = Convert.ToInt16(AmResult.OpportunityID);
                obj.OpportunityKeyID   = Convert.ToInt16(AmResult.OpportunityKeyID);
                obj.OpportunityLobId   = AmResult.OpportunityLobId;
                obj.OpportunityLobName = AmResult.OpportunityLobName;
                obj.OpportunityName    = AmResult.OpportunityName;
                obj.ProductGroup       = AmResult.ProductGroup;
                obj.ProductGroupID     = AmResult.ProductGroupID;
                obj.ProgramName        = AmResult.ProgramName;
                obj.ProjectID          = Convert.ToInt16(AmResult.ProjectID);
                obj.SDUID              = AmResult.SDUID;
                obj.ServiceLine        = AmResult.ServiceLine;
                obj.ServiceLineID      = AmResult.ServiceLineID;
                obj.SowStatusValue     = AmResult.SowStatusValue;
                obj.sowvalue           = AmResult.SOWStatus;
                obj.S_No               = AmResult.S_No;
                obj.TCV       = AmResult.TCV;
                obj.IsUpdated = Convert.ToBoolean(AmResult.IsUpdated);
                List <string> Objquater  = new List <string>();
                List <string> QuaterName = new List <string>();

                var dbQuaterlist = financetoolentities.Quaters.Where(i => i.IsActive == true).ToList();

                foreach (var quater in dbQuaterlist)
                {
                    var value        = AmResult.GetType().GetProperty(quater.QuaterName);
                    var Quartervalue = value.GetValue(AmResult, null).ToString();
                    var qvalue       = MyCustomFormat(Convert.ToDouble(Quartervalue));
                    Objquater.Add(qvalue);
                    QuaterName.Add(quater.QuaterName + "_FC($K)");
                }

                if (Iteration == 0)
                {
                    obj.QuaterName = QuaterName;
                }
                obj.Quaterlist = Objquater;
                _AdminMainResult.Add(obj);
                Iteration++;
            }
            return(View(_AdminMainResult));
        }
Beispiel #4
0
        public List <DUHMainDetailsResult> NewDetails(FormCollection _formcollectionobj)
        {
            string SDUID = "ALL";
            string DUID  = "ALL";

            if (_formcollectionobj["DUHModel.SDUID"] == "0")
            {
                SDUID = "ALL";
            }
            else
            {
                SDUID = _formcollectionobj["DUHModel.SDUID"];
            }
            if (_formcollectionobj["DUHModel.DUID"] == "0")
            {
                DUID = "ALL";
            }
            else
            {
                DUID = _formcollectionobj["DUHModel.DUID"];
            }
            QuaterGenerator.UpdateActiveQuaters();
            List <Usp_GetDUHDetails_Comparision_V2_Result> DUHGriddetails = new List <Usp_GetDUHDetails_Comparision_V2_Result>();

            if (_formcollectionobj["DUHModel.ProjectID"] == "0")
            {
                DUHGriddetails = financetoolentities.Usp_GetDUHDetails_Comparision_V2(SDUID, DUID).Where(i => i.IsUpdated == false).ToList();
            }
            else
            {
                DUHGriddetails = financetoolentities.Usp_GetDUHDetails_Comparision_V2(SDUID, DUID).Where(i => i.IsUpdated == false && i.ProjectID == Convert.ToInt32(_formcollectionobj["DUHModel.ProjectID"])).ToList();
            }
            // var DUHGriddetails = financetoolentities.Usp_GetDUHDetails_Comparision_V2(SDUID, DUID).Where(i => i.IsUpdated == false).ToList();
            // var DUHGriddetails = financetoolentities.Usp_GetDUHMainDetails().ToList();
            int Iteration = 0;


            List <DUHMainDetailsResult> DUHMainDetailsResultList = new List <DUHMainDetailsResult>();

            foreach (var DUHdbvalues in DUHGriddetails)
            {
                DUHMainDetailsResult duhmaindetail = new DUHMainDetailsResult();
                duhmaindetail.AMID               = DUHdbvalues.AMID;
                duhmaindetail.AMName             = DUHdbvalues.AMName;
                duhmaindetail.CustomerID         = DUHdbvalues.CustomerID;
                duhmaindetail.Customername       = DUHdbvalues.Customername;
                duhmaindetail.DBBLDU             = DUHdbvalues.DBBLDU;
                duhmaindetail.DBBLDUID           = DUHdbvalues.DBBLDUID;
                duhmaindetail.DealStageID        = DUHdbvalues.DealStageID;
                duhmaindetail.DUID               = DUHdbvalues.DUID;
                duhmaindetail.DUName             = DUHdbvalues.DUName;
                duhmaindetail.LOBID              = DUHdbvalues.LOBID;
                duhmaindetail.LOBName            = DUHdbvalues.LOBName;
                duhmaindetail.Note               = DUHdbvalues.Note;
                duhmaindetail.OpportunityID      = DUHdbvalues.OpportunityID;
                duhmaindetail.OpportunityKeyID   = DUHdbvalues.OpportunityKeyID;
                duhmaindetail.OpportunityLobId   = DUHdbvalues.OpportunityLobId;
                duhmaindetail.OpportunityLobName = DUHdbvalues.OpportunityLobName;
                duhmaindetail.OpportunityName    = DUHdbvalues.OpportunityName;
                duhmaindetail.poavilable         = DUHdbvalues.poavilable;
                duhmaindetail.pobalance          = DUHdbvalues.pobalance;
                duhmaindetail.ProductGroup       = DUHdbvalues.ProductGroup;
                duhmaindetail.ProductGroupID     = DUHdbvalues.ProductGroupID;
                duhmaindetail.ProgramName        = DUHdbvalues.ProgramName;
                duhmaindetail.ProjectID          = DUHdbvalues.ProjectID;
                duhmaindetail.ProjectName        = DUHdbvalues.ProjectName;
                duhmaindetail.SDUID              = DUHdbvalues.SDUID;
                duhmaindetail.ServiceLine        = DUHdbvalues.ServiceLine;
                duhmaindetail.ServiceLineID      = DUHdbvalues.ServiceLineID;
                duhmaindetail.SowStatus          = DUHdbvalues.SOWStatus1;
                duhmaindetail.S_No               = DUHdbvalues.S_No;
                List <string> Objquater  = new List <string>();
                List <string> QuaterName = new List <string>();
                List <string> Operations = new List <string>();
                Operations.Add("_FC");
                var dbQuaterlist        = financetoolentities.Quaters.Where(i => i.IsActive == true).ToList();
                var dbQuater_Actuallist = financetoolentities.quater_Actual.Where(i => i.IsActive == true).ToList();
                foreach (var quater in dbQuaterlist)
                {
                    foreach (var Obj in Operations)
                    {
                        var value        = DUHdbvalues.GetType().GetProperty(quater.QuaterName + Obj);
                        var Quartervalue = value.GetValue(DUHdbvalues, null).ToString();
                        var qvalue       = MyCustomFormat(Convert.ToDouble(Quartervalue));
                        Objquater.Add(qvalue);
                    }
                    QuaterName.Add(quater.QuaterName + "_FC($K)");
                    // QuaterName.Add(quater.QuaterName + "_ACT($K)");
                }
                Operations.Clear();
                Operations.Add("_ACT");
                foreach (var quater in dbQuater_Actuallist)
                {
                    foreach (var Obj in Operations)
                    {
                        var value        = DUHdbvalues.GetType().GetProperty(quater.QuaterName + Obj);
                        var Quartervalue = value.GetValue(DUHdbvalues, null).ToString();
                        var qvalue       = MyCustomFormat(Convert.ToDouble(Quartervalue));
                        Objquater.Add(qvalue);
                    }
                    //QuaterName.Add(quater.QuaterName + "_FC($K)");
                    QuaterName.Add(quater.QuaterName + "_ACT($K)");
                }

                if (Iteration == 0)
                {
                    duhmaindetail.QuaterName = QuaterName;
                }
                duhmaindetail.Quaterlist = Objquater;
                DUHMainDetailsResultList.Add(duhmaindetail);
                Iteration++;
            }
            return(DUHMainDetailsResultList);
        }
Beispiel #5
0
        public ActionResult Index()
        {
            QuaterGenerator.UpdateActiveQuaters();
            var DUHGriddetails = financetoolentities.Usp_GetDUHMainDetailsByUserID_V2(Session["UserId"].ToString()).Where(i => i.IsUpdated == false).ToList();
            // var DUHGriddetails = financetoolentities.Usp_GetDUHMainDetails().ToList();
            int Iteration = 0;

            List <DUHMainDetailsResult> DUHMainDetailsResultList = new List <DUHMainDetailsResult>();

            foreach (var DUHdbvalues in DUHGriddetails)
            {
                DUHMainDetailsResult duhmaindetail = new DUHMainDetailsResult();
                duhmaindetail.AMID               = DUHdbvalues.AMID;
                duhmaindetail.AMName             = DUHdbvalues.AMName;
                duhmaindetail.CustomerID         = DUHdbvalues.CustomerID;
                duhmaindetail.Customername       = DUHdbvalues.Customername;
                duhmaindetail.DBBLDU             = DUHdbvalues.DBBLDU;
                duhmaindetail.DBBLDUID           = DUHdbvalues.DBBLDUID;
                duhmaindetail.DealStageID        = DUHdbvalues.DealStageID;
                duhmaindetail.DUID               = DUHdbvalues.DUID;
                duhmaindetail.DUName             = DUHdbvalues.DUName;
                duhmaindetail.LOBID              = DUHdbvalues.LOBID;
                duhmaindetail.LOBName            = DUHdbvalues.LOBName;
                duhmaindetail.Note               = DUHdbvalues.Note;
                duhmaindetail.OpportunityID      = DUHdbvalues.OpportunityID;
                duhmaindetail.OpportunityKeyID   = DUHdbvalues.OpportunityKeyID;
                duhmaindetail.OpportunityLobId   = DUHdbvalues.OpportunityLobId;
                duhmaindetail.OpportunityLobName = DUHdbvalues.OpportunityLobName;
                duhmaindetail.OpportunityName    = DUHdbvalues.OpportunityName;
                duhmaindetail.pobalance          = DUHdbvalues.pobalance;
                duhmaindetail.ProductGroup       = DUHdbvalues.ProductGroup;
                duhmaindetail.ProductGroupID     = DUHdbvalues.ProductGroupID;
                duhmaindetail.ProgramName        = DUHdbvalues.ProgramName;
                duhmaindetail.ProjectID          = DUHdbvalues.ProjectID;
                duhmaindetail.ProjectName        = DUHdbvalues.ProjectName;
                duhmaindetail.SDUID              = DUHdbvalues.SDUID;
                duhmaindetail.ServiceLine        = DUHdbvalues.ServiceLine;
                duhmaindetail.ServiceLineID      = DUHdbvalues.ServiceLineID;
                duhmaindetail.SowStatus          = DUHdbvalues.SOWStatus1;
                duhmaindetail.S_No               = DUHdbvalues.S_No;
                if (DUHdbvalues.poavilable == "1")
                {
                    duhmaindetail.poavilable = "Yes";
                }
                else if (DUHdbvalues.poavilable == "0")
                {
                    duhmaindetail.poavilable = "No";
                }

                List <string> Objquater  = new List <string>();
                List <string> QuaterName = new List <string>();
                List <string> Operations = new List <string>();
                Operations.Add("_FC");
                var dbQuaterlist        = financetoolentities.Quaters.Where(i => i.IsActive == true).ToList();
                var dbQuater_Actuallist = financetoolentities.quater_Actual.Where(i => i.IsActive == true).ToList();
                foreach (var quater in dbQuaterlist)
                {
                    foreach (var Obj in Operations)
                    {
                        var value        = DUHdbvalues.GetType().GetProperty(quater.QuaterName + Obj);
                        var Quartervalue = value.GetValue(DUHdbvalues, null).ToString();
                        var qvalue       = MyCustomFormat(Convert.ToDouble(Quartervalue));
                        Objquater.Add(qvalue);
                    }
                    QuaterName.Add(quater.QuaterName + "_FC($K)");
                    // QuaterName.Add(quater.QuaterName + "_ACT($K)");
                }
                Operations.Clear();
                Operations.Add("_ACT");
                foreach (var quater in dbQuater_Actuallist)
                {
                    foreach (var Obj in Operations)
                    {
                        var value        = DUHdbvalues.GetType().GetProperty(quater.QuaterName + Obj);
                        var Quartervalue = value.GetValue(DUHdbvalues, null).ToString();
                        var qvalue       = MyCustomFormat(Convert.ToDouble(Quartervalue));
                        Objquater.Add(qvalue);
                    }
                    //QuaterName.Add(quater.QuaterName + "_FC($K)");
                    QuaterName.Add(quater.QuaterName + "_ACT($K)");
                }

                if (Iteration == 0)
                {
                    duhmaindetail.QuaterName = QuaterName;
                }
                duhmaindetail.Quaterlist = Objquater;
                DUHMainDetailsResultList.Add(duhmaindetail);
                Iteration++;
            }
            return(View(DUHMainDetailsResultList));
        }