public bool SaveInfraData(string action, out string msg)
        {
            msg = string.Empty;
            bool success = false, IsInfraInfoVisible = false;

            if (InfraDeptData == null || InfraDeptData.Count == 0)
            {
                return(success);
            }

            foreach (var item in InfraDeptData)
            {
                item.MenuID        = DataAccess.Enum.Menu.INFRA.ToString();
                item.DeptID        = SessionManager.DeptID;
                item.DataUser      = SessionManager.UserName;
                item.DataUpdatedOn = DateTime.Now;
                item.DataCaptYM    = SessionManager.DataCaptYR;
                item.DataStatus    = FormCommonMethods.GetStatusByAction(action);
                item.DataValid     = "Y";
                item.DataLocked    = "N";
                item.DataStatusLog = SessionManager.UserName + " " + DateTime.Now.ToString("ddd, dd MMM yyyy HH:mm:ss");
            }

            if (SessionManager.DeptID == "EW")
            {
                IsInfraInfoVisible = true;
                foreach (var item in InfraInfoData)
                {
                    item.MenuID        = DataAccess.Enum.Menu.INFRA.ToString();
                    item.DataUser      = SessionManager.UserName;
                    item.DeptID        = SessionManager.DeptID;
                    item.DataUpdatedOn = DateTime.Now;
                    item.DataCaptYM    = SessionManager.DataCaptYR;
                    item.DataStatus    = FormCommonMethods.GetStatusByAction(action);
                    item.DataValid     = "Y";
                    item.DataLocked    = "N";
                    item.DataStatusLog = SessionManager.UserName + " " + DateTime.Now.ToString("ddd, dd MMM yyyy HH:mm:ss");
                    item.InfraRemarks  = SessionManager.UserName + " on " + DateTime.Now.ToString("ddd, dd MMM yyyy HH:mm:ss");
                }
            }
            else
            {
                IsInfraInfoVisible = false;
                InfraInfoData      = new List <InfraInfo>();
                InfraInfo item = new InfraInfo();
                item.DeptID        = SessionManager.DeptID;
                item.MenuID        = DataAccess.Enum.Menu.INFRA.ToString();
                item.DataUser      = SessionManager.UserName;
                item.DataUpdatedOn = DateTime.Now;
                item.DataCaptYM    = SessionManager.DataCaptYR;
                item.DataStatus    = FormCommonMethods.GetStatusByAction(action);
                item.DataValid     = "Y";
                item.DataLocked    = "N";
                item.DataStatusLog = SessionManager.UserName + " " + DateTime.Now.ToString("ddd, dd MMM yyyy HH:mm:ss");
                InfraInfoData.Add(item);
            }

            try
            {
                FormsRepository formsRepository = new FormsRepository();
                DataTable       dtInfraInfo     = null;
                DataTable       dtInfraDept     = ToDataTable(InfraDeptData);
                dtInfraInfo = ToDataTable(InfraInfoData);
                success     = formsRepository.UpdateBulkInfraFormData(dtInfraDept, dtInfraInfo, SessionManager.DataCaptYR, IsInfraInfoVisible);
            }
            catch (Exception ex)
            {
            }
            return(success);
        }