public HttpResponseMessage Delete_UserFundcenter_POManager_Mapping(UserFundCenterMapping FundCentjson)
        {
            try
            {
                List <TEPOFundCenterUserMapping> FundVal = db.TEPOFundCenterUserMappings.Where(x => x.FundCenterId == FundCentjson.FundCenter && x.IsDeleted == false).ToList();

                foreach (TEPOFundCenterUserMapping TEPOFUnd in FundVal)
                {
                    TEPOFUnd.IsDeleted      = true;
                    TEPOFUnd.LastModifiedBy = FundCentjson.LastModifiedBy;
                    TEPOFUnd.LastModifiedOn = DateTime.Now;
                    db.Entry(TEPOFUnd).CurrentValues.SetValues(TEPOFUnd);
                    db.SaveChanges();
                }

                sinfo.errorcode    = 0;
                sinfo.errormessage = "Deleted Sucessfully";
                sinfo.listcount    = 0;
                return(new HttpResponseMessage()
                {
                    Content = new JsonContent(new { info = sinfo })
                });
            }
            catch (Exception ex)
            {
                ExceptionObj.RecordUnHandledException(ex);
                sinfo.errorcode    = 1;
                sinfo.errormessage = "Fail";
                sinfo.listcount    = 0;
                return(new HttpResponseMessage()
                {
                    Content = new JsonContent(new { info = sinfo })
                });
            }
        }
        public HttpResponseMessage Add_UserFundcenter_POManager_Mapping(UserFundCenterMapping FundCentjson)
        {
            try
            {
                int FundCount = db.TEPOFundCenterUserMappings.Where(x => x.FundCenterId == FundCentjson.FundCenter && x.IsDeleted == false).Count();
                if (FundCount == 0)
                {
                    if (FundCentjson.MasterSubmitterlist.Count > 0)
                    {
                        foreach (MasterSubmitterlistModel Submitter in FundCentjson.MasterSubmitterlist.OrderBy(x => x.SequenceId).ToList())
                        {
                            //if(Submitter.)
                            TEPOFundCenterUserMapping TEPOFund = new TEPOFundCenterUserMapping();

                            TEPOFund.UserId         = Submitter.SubmiterID;
                            TEPOFund.FundCenterId   = FundCentjson.FundCenter;
                            TEPOFund.CreatedBy      = FundCentjson.LastModifiedBy;
                            TEPOFund.LastModifiedBy = FundCentjson.LastModifiedBy;
                            TEPOFund.LastModifiedOn = DateTime.Now;
                            TEPOFund.CreatedOn      = DateTime.Now;
                            TEPOFund.IsDeleted      = false;
                            db.TEPOFundCenterUserMappings.Add(TEPOFund);
                            db.SaveChanges();
                        }
                        sinfo.errorcode    = 0;
                        sinfo.errormessage = "Saved Sucessfully";
                        sinfo.listcount    = 0;
                        return(new HttpResponseMessage()
                        {
                            Content = new JsonContent(new { info = sinfo })
                        });
                    }
                    else
                    {
                        sinfo.errorcode    = 1;
                        sinfo.errormessage = "No Submitters Present";
                        sinfo.listcount    = 0;
                        return(new HttpResponseMessage()
                        {
                            Content = new JsonContent(new { info = sinfo })
                        });
                    }
                }
                else
                {
                    sinfo.errorcode    = 1;
                    sinfo.errormessage = "mapping has been Done for this FundCenter";
                    sinfo.listcount    = 0;
                    return(new HttpResponseMessage()
                    {
                        Content = new JsonContent(new { info = sinfo })
                    });
                }
            }
            catch (Exception ex)
            {
                ExceptionObj.RecordUnHandledException(ex);
                sinfo.errorcode    = 1;
                sinfo.errormessage = "Fail";
                sinfo.listcount    = 0;
                return(new HttpResponseMessage()
                {
                    Content = new JsonContent(new { info = sinfo })
                });
            }
        }