private IList <RoleRightsModel> fnRightsBasedMenu_List(RoleRightsModel apiObject, ref string strResult)
        {
            string strReturnCode = "000";
            string strReturnMsg  = "UnDefined";
            string crCnString    = UtilityLib.GetConnectionString();
            IList <RoleRightsModel> objRightsModelList = new List <RoleRightsModel>();

            DataSet usersInfoDS = DAL_RoleRightsBasedMenu.ShowModules_RightsBased(crCnString, apiObject.RequestType, apiObject.RoleId, apiObject.CompanyId);

            DataTable usersInfoDT = usersInfoDS.Tables[0];

            if (usersInfoDT != null && usersInfoDT.Rows.Count > 0)
            {
                strReturnCode = "001";
                strReturnMsg  = "Success";
                foreach (DataRow dr in usersInfoDT.Rows)
                {
                    apiObject = new RoleRightsModel();
                    apiObject.RoleRightsId = UtilityLib.FormatNumber(dr["RoleRightsId"].ToString());
                    apiObject.RoleId       = UtilityLib.FormatNumber(dr["RoleId"].ToString());
                    apiObject.RoleName     = (string)dr["RoleName"];
                    apiObject.ModuleName   = (string)dr["ModuleName"];
                    //apiObject.ModuleOrder = (string)dr["ModuleOrder"];
                    apiObject.ModuleURL         = (string)dr["ModuleURL"];
                    apiObject.ModuleCode        = (string)dr["ModuleCode"];
                    apiObject.ModuleImagePath   = (string)dr["ModuleImagePath"];
                    apiObject.ModuleId          = UtilityLib.FormatNumber(dr["ModuleId"].ToString());
                    apiObject.PrecedingModuleId = UtilityLib.FormatNumber(dr["PrecedingModuleId"].ToString());
                    apiObject.View      = UtilityLib.FormatBoolean(dr["View"].ToString());
                    apiObject.Edit      = UtilityLib.FormatBoolean(dr["Edit"].ToString());
                    apiObject.Create    = UtilityLib.FormatBoolean(dr["Create"].ToString());
                    apiObject.Delete    = UtilityLib.FormatBoolean(dr["Delete"].ToString());
                    apiObject.CompanyId = (Guid)(dr["CompanyId"]);
                    objRightsModelList.Add(apiObject);
                }
            }
            else
            {
                strReturnCode = "002";
                strReturnMsg  = "Fail-Record Not Found";
            }
            strResult = strReturnCode + "|" + strReturnMsg;
            return(objRightsModelList);
        }
        private IList <ProductMasterModel> fnProductMaster_List(ProductMasterModel apiObject, ref string strResult)
        {
            string strReturnCode = "000";
            string strReturnMsg  = "UnDefined";
            string crCnString    = UtilityLib.GetConnectionString();
            IList <ProductMasterModel> objFieldClassModelList = new List <ProductMasterModel>();
            DataSet usersInfoDS = DL_ProductMaster.Product_List(crCnString, apiObject.RequestType, apiObject.SearchBy, apiObject.SearchString,
                                                                apiObject.Productid, apiObject.CompanyId, apiObject.ItemsPerPage, apiObject.RequestPageNo, apiObject.CurrentPageNo);
            DataTable usersInfoDT = usersInfoDS.Tables[0];

            if (usersInfoDT != null && usersInfoDT.Rows.Count > 0)
            {
                strReturnCode = "001";
                strReturnMsg  = "Success";
                foreach (DataRow dr in usersInfoDT.Rows)
                {
                    apiObject             = new ProductMasterModel();
                    apiObject.Productid   = UtilityLib.FormatNumber(dr["Processid"].ToString());
                    apiObject.ProductName = (string)dr["ProductName"];
                    apiObject.UOM         = UtilityLib.FormatNumber(dr["UOM"].ToString());
                    //apiObject.State = UtilityLib.FormatString(dr["State"]);
                    //apiObject.Texture = UtilityLib.FormatNumber(dr["Texture "].ToString());
                    //apiObject.Catagory = UtilityLib.FormatNumber(dr["Catagory "].ToString());
                    apiObject.CreatedBy         = (Guid)(dr["CreatedBy"]);
                    apiObject.CreatedDate       = UtilityLib.FormatDate(dr["CreatedDate"]);
                    apiObject.IsDelete          = UtilityLib.FormatBoolean(dr["IsDelete"].ToString());
                    apiObject.SafeLifeInGodown  = UtilityLib.FormatDate(dr["SafeLifeInGodown"]);
                    apiObject.ProcessId         = (string)(dr["ProcessId"]);
                    apiObject.BuyProductId      = UtilityLib.FormatNumber(dr["BuyProductId"].ToString());
                    apiObject.BuyProductPacking = UtilityLib.FormatNumber(dr["BuyProductPacking"].ToString());
                    apiObject.CompanyId         = (Guid)(dr["CompanyId"]);
                    objFieldClassModelList.Add(apiObject);
                }
            }
            else
            {
                strReturnCode = "002";
                strReturnMsg  = "Fail-Record Not Found";
            }
            strResult = strReturnCode + "|" + strReturnMsg;
            return(objFieldClassModelList);
        }
        private IList <RoleRightsModel> fnRights_List(RoleRightsModel apiObject, ref string strResult)
        {
            string strReturnCode = "000";
            string strReturnMsg  = "UnDefined";
            string crCnString    = UtilityLib.GetConnectionString();
            IList <RoleRightsModel> objRightsModelList = new List <RoleRightsModel>();

            DataSet usersInfoDS = DAL_RoleRights.Rights_List(crCnString, apiObject.RequestType, apiObject.SearchBy, apiObject.SearchString, apiObject.IntID,
                                                             apiObject.RoleId, apiObject.ModuleId, apiObject.CompanyId, apiObject.ItemsPerPage, apiObject.RequestPageNo, apiObject.CurrentPageNo);

            DataTable usersInfoDT = usersInfoDS.Tables[0];

            if (usersInfoDT != null && usersInfoDT.Rows.Count > 0)
            {
                strReturnCode = "001";
                strReturnMsg  = "Success";
                foreach (DataRow dr in usersInfoDT.Rows)
                {
                    apiObject = new RoleRightsModel();
                    apiObject.RoleRightsId = UtilityLib.FormatNumber(dr["RoleRightsId"].ToString());
                    apiObject.RoleId       = UtilityLib.FormatNumber(dr["RoleId"].ToString());
                    apiObject.RoleName     = (string)dr["RoleName"];
                    apiObject.ModuleId     = UtilityLib.FormatNumber(dr["ModuleId"].ToString());
                    apiObject.ModuleName   = (string)dr["ModuleName"];
                    apiObject.View         = UtilityLib.FormatBoolean(dr["View"].ToString());
                    apiObject.Edit         = UtilityLib.FormatBoolean(dr["Edit"].ToString());
                    apiObject.Create       = UtilityLib.FormatBoolean(dr["Create"].ToString());
                    apiObject.Delete       = UtilityLib.FormatBoolean(dr["Delete"].ToString());
                    apiObject.CompanyId    = (Guid)(dr["CompanyId"]);
                    objRightsModelList.Add(apiObject);
                }
            }
            else
            {
                strReturnCode = "002";
                strReturnMsg  = "Fail-Record Not Found";
            }
            strResult = strReturnCode + "|" + strReturnMsg;
            return(objRightsModelList);
        }
        private IList <ProcessMasterModel> fnProcessMaster_List(ProcessMasterModel apiObject, ref string strResult)
        {
            string strReturnCode = "000";
            string strReturnMsg  = "UnDefined";
            string crCnString    = UtilityLib.GetConnectionString();
            IList <ProcessMasterModel> objFieldClassModelList = new List <ProcessMasterModel>();
            DataSet usersInfoDS = DL_ProcessMaster.Process_List(crCnString, apiObject.RequestType, apiObject.SearchBy, apiObject.SearchString,
                                                                apiObject.ProcessId, apiObject.CompanyId, apiObject.ItemsPerPage, apiObject.RequestPageNo, apiObject.CurrentPageNo);
            DataTable usersInfoDT = usersInfoDS.Tables[0];

            if (usersInfoDT != null && usersInfoDT.Rows.Count > 0)
            {
                strReturnCode = "001";
                strReturnMsg  = "Success";
                foreach (DataRow dr in usersInfoDT.Rows)
                {
                    apiObject                 = new ProcessMasterModel();
                    apiObject.ProcessId       = UtilityLib.FormatNumber(dr["ProcessId"].ToString());
                    apiObject.ProcessName     = (string)dr["ProcessName"];
                    apiObject.QuantityFlag    = UtilityLib.FormatBoolean(dr["QuantityFlag"].ToString());
                    apiObject.ByProduct       = UtilityLib.FormatBoolean(dr["ByProduct"].ToString());
                    apiObject.WastageFlag     = UtilityLib.FormatBoolean(dr["WastageFlag"].ToString());
                    apiObject.QuantityFlag    = UtilityLib.FormatBoolean(dr["QuantityFlag"].ToString());
                    apiObject.IsDelete        = UtilityLib.FormatBoolean(dr["IsDelete"].ToString());
                    apiObject.ProcessDuration = UtilityLib.FormatDate(dr["ProcessDuration"]).ToString();
                    apiObject.ProcessVolume   = UtilityLib.FormatFloat(dr["ProcessVolume"]);
                    //apiObject.CompanyId = (Guid)(dr["CompanyId"]);
                    objFieldClassModelList.Add(apiObject);
                }
            }
            else
            {
                strReturnCode = "002";
                strReturnMsg  = "Fail-Record Not Found";
            }
            strResult = strReturnCode + "|" + strReturnMsg;
            return(objFieldClassModelList);
        }