private IList <GeneralMasterClass> fnGeneralMasterClass_List(GeneralMasterClass apiObject, ref string strResult) { string strReturnCode = "000"; string strReturnMsg = "UnDefined"; string crCnString = UtilityLib.GetConnectionString(); IList <GeneralMasterClass> objGeneralClassModelList = new List <GeneralMasterClass>(); DataSet usersInfoDS = DAL_GeneralMasterClass.GeneralMasterClass_List(crCnString, apiObject.RequestType, apiObject.SearchBy, apiObject.SearchString, apiObject.IntID, 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 GeneralMasterClass(); apiObject.GeneralMasterClassId = UtilityLib.FormatNumber(dr["GeneralMasterClassId"].ToString()); apiObject.GeneralMasterClassName = (string)dr["GeneralMasterClassName"]; apiObject.CompanyId = (Guid)(dr["CompanyId"]); objGeneralClassModelList.Add(apiObject); } } else { strReturnCode = "002"; apiObject.ReturnMessage = "Fail-Record Not Found"; } strResult = strReturnCode + "|" + strReturnMsg; return(objGeneralClassModelList); }
public InventoryModel GetREciptNo() { string strResult = ""; string strReturnCode = "000"; string strReturnMsg = "UnDefined"; InventoryModel apiObject = new InventoryModel(); string crCnString = UtilityLib.GetConnectionString(); DataSet dt = DAL_Inventory.GetRecipt(crCnString); DataTable usersInfoDT = dt.Tables[0]; if (usersInfoDT != null && usersInfoDT.Rows.Count > 0) { strReturnCode = "001"; strReturnMsg = "Success"; foreach (DataRow dr in usersInfoDT.Rows) { apiObject = new InventoryModel(); apiObject.NewReciptNo = UtilityLib.FormatNumber(dr["UpRwcipt"].ToString()); } } else { strReturnCode = "002"; strReturnMsg = "Fail-Record Not Found"; } strResult = strReturnCode + "|" + strReturnMsg; return(apiObject); ; }
private UOMConversionModel fnUOMConversion_Get(UOMConversionModel apiObject, ref string strResult) { string strReturnCode = "000"; string strReturnMsg = "UnDefined"; string crCnString = UtilityLib.GetConnectionString(); UOMConversionModel objUOMConversion = new UOMConversionModel(); DataSet usersInfoDS = DAL_UOMMaster.UOMConversion_Get(crCnString, apiObject.SourceUOMId, apiObject.DestinationUOMId, apiObject.CompanyId); DataTable usersInfoDT = usersInfoDS.Tables[0]; if (usersInfoDT != null && usersInfoDT.Rows.Count > 0) { strReturnCode = "001"; strReturnMsg = "Success"; DataRow dr = usersInfoDT.Rows[0]; objUOMConversion.SourceUOMId = UtilityLib.FormatNumber(dr["SourceUOMId"].ToString()); objUOMConversion.SourceConversionRation = UtilityLib.FormatDecimal(dr["SourceConversionRation"].ToString()); objUOMConversion.DestinationUOMId = UtilityLib.FormatNumber(dr["DestinationUOMId"].ToString()); objUOMConversion.DestinationConversionRation = UtilityLib.FormatDecimal(dr["DestinationConversionRation"].ToString()); } else { strReturnCode = "002"; apiObject.ReturnMessage = "Fail-Record Not Found"; } strResult = strReturnCode + "|" + strReturnMsg; return(objUOMConversion); }
public EnemyLockRadar(AutoPilot ap, float dScrn, float radarScale, Vector2 radarOffsetDef, Vector2 radarWindow, MenuLib menu) { string back; int numBack; this.ap = ap; this.dScrn = dScrn; this.radarScale = radarScale; this.radarOffsetDef = radarOffsetDef; this.radarWindow = radarWindow; radarOffset = radarOffsetDef; Util = new UtilityLib(ap, dScrn); Scan = new ScanLib(ap, dScrn); Lock = new LockOnLib(ap, dScrn); Key = new KeybindLib(ap); Menu = menu; Rad = new RadarLib(ap, dScrn, radarOffset, radarScale, radarWindow); List <SubMenu> RadarMenu = new List <SubMenu>(); back = "MainMenu"; numBack = 0; RadarMenu.Add(new SubMenu("Radar Scale", 1, numBack, back, "", 0.15f, 0.001f, 0.5f, 0f)); RadarMenu.Add(new SubMenu("Radar X", 1, numBack, back, "", 0f, 10f, 0.5f)); RadarMenu.Add(new SubMenu("Radar Y", 1, numBack, back, "", 0f, 10f, 0.5f)); Menu.MenuAdd("RadarMenu", RadarMenu); List <SubMenu> LockOnMenu = new List <SubMenu>(); back = "MainMenu"; numBack = 1; LockOnMenu.Add(new SubMenu("LockOnStat", 2, numBack, back, "", false)); LockOnMenu.Add(new SubMenu("X", 0, numBack, back, "")); LockOnMenu.Add(new SubMenu("Y", 0, numBack, back, "")); LockOnMenu.Add(new SubMenu("Z", 0, numBack, back, "")); Menu.MenuAdd("LockOnMenu", LockOnMenu); }
public override void OnStart(AutoPilot ap)//�J�n���Ɉ����s { UtilityLib Util; ScanLib Scan; LockOnLib Lock; RadarLib Rad; KeybindLib Key; MenuLib Menu; EnemyLockRadar ELR; //Common Things Vector3 botPos; Vector3 botVel; float botDir; float botSpeed; float dScrn = Screen.height / 10; Util = new UtilityLib(ap, dScrn); Key = new KeybindLib(ap); Menu = new MenuLib(ap); ap.SetAimTolerance(20); ap.SetLogicalScreenHeight(Screen.height); lastdistance = new List <Vector3>(); AntiDuplicate(); CanvasTest(ap); TrailStart(ap); // trailRend.enabled = true; this.mcnTf = ap.transform.parent; foreach (Transform c in mcnTf) { if ((this.coreTf = c.Find("Core")) != null) { break; } } headLightL = createHeadLight(); headLightL.transform.localPosition = new Vector3(1f, 4f, 6.0f); headLightL.transform.localRotation = Quaternion.Euler(20, 0, 0); headLightR = createHeadLight(); headLightR.transform.localPosition = new Vector3(-1f, 4f, 6.0f); headLightR.transform.localRotation = Quaternion.Euler(20, 0, 0); GameObject[] selfObj = GameObject.FindGameObjectsWithTag("self"); layerMask = 0; // int layerMask; �Ƃ���OnStart()�̊O�Ő錾���Ă��� foreach (GameObject obj in selfObj) { int l = 1 << obj.layer; layerMask = layerMask | l; for (int i = 0; i < obj.transform.childCount; i++) { l = 1 << obj.transform.GetChild(i).gameObject.layer; layerMask = layerMask | l; } } layerMask = ~layerMask; }
public RadarLib(AutoPilot _ap, float dScrn, Vector2 offset, float scale, Vector2 radarWindow) { Scan = new ScanLib(ap, dScrn); Util = new UtilityLib(ap, dScrn); this.radarOffset = offset; this.radarScale = scale; this.radarWindow = radarWindow; this.ap = _ap; this.dScrn = dScrn; }
public void ZeroAmount() { UtilityLib obj = new UtilityLib(); try { obj.calculateDiscount(0); } catch (Exception e) { } }
public ScanLib(AutoPilot _ap, float dScrn) { Util = new UtilityLib(ap, dScrn); this.ap = _ap; this.dScrn = dScrn; this.enemybotProp = new Dictionary <string, EnemyProp>(); this.plasmaProp = new Dictionary <string, EnemyProp>(); this.bulletProp = new List <GameObject>(); this.lockedEnemyList = new List <EnemyProp>(); this.topEnemyList = new List <EnemyProp>(); this.aim = new List <Vector3>(); }
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); }
public GeneralMasterModel GeneralMaster_InsertUpdate(ArrayList paramList) { string strResult = ""; string strReturnCode = "000"; string strReturnMsg = "UnDefined"; GeneralMasterModel apiObject = new GeneralMasterModel(); apiObject = Newtonsoft.Json.JsonConvert.DeserializeObject <GeneralMasterModel>(paramList[0].ToString()); string crCnString = UtilityLib.GetConnectionString(); int FieldCodeInfo = DAL_GeneralMaster.GeneralMaster_InsertUpdate(crCnString, apiObject.GeneralMasterId, apiObject.GeneralMasterClassId, apiObject.GeneralMasterName, apiObject.GeneralMasterCode, apiObject.GeneralMasterSquence, apiObject.CreatedBy, apiObject.ModifiedBy, apiObject.CompanyId); if (FieldCodeInfo == 0) { apiObject.ReturnCode = FieldCodeInfo; apiObject.ReturnMessage = "Success"; } else if (FieldCodeInfo == 1) { apiObject.ReturnCode = FieldCodeInfo; apiObject.ReturnMessage = "General Master already exists"; } else if (FieldCodeInfo == 101) { apiObject.ReturnCode = FieldCodeInfo; apiObject.ReturnMessage = "General Master updated successfully"; } else if (FieldCodeInfo == 2) { apiObject.ReturnCode = FieldCodeInfo; apiObject.ReturnMessage = "record is already updated by someone else"; } else { apiObject.ReturnCode = FieldCodeInfo; apiObject.ReturnMessage = "Fail-Record Not Inserted"; } strResult = strReturnCode + "|" + strReturnMsg; return(apiObject); }
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); }
public InventoryModel Inventory_InsertUpdate(ArrayList paramList) { string strResult = ""; string strReturnCode = "000"; string strReturnMsg = "UnDefined"; InventoryModel apiObject = new InventoryModel(); apiObject = Newtonsoft.Json.JsonConvert.DeserializeObject <InventoryModel>(paramList[0].ToString()); string crCnString = UtilityLib.GetConnectionString(); int Inventoryinfo = DAL_Inventory.InventoryInsert(crCnString, apiObject.FarmerId, apiObject.ReciptNo, apiObject.LoginId, apiObject.PersonName, apiObject.Quantity, apiObject.Unit, apiObject.ComapnyId, apiObject.RawMaterial, apiObject.Storage, apiObject.CreatedDate); if (Inventoryinfo == 0) { apiObject.ReturnCode = Inventoryinfo; apiObject.ReturnMessage = "Inventory Added Successfully"; } else if (Inventoryinfo == 1) { apiObject.ReturnCode = Inventoryinfo; apiObject.ReturnMessage = "Inventory already exists"; } else if (Inventoryinfo == 101) { apiObject.ReturnCode = Inventoryinfo; apiObject.ReturnMessage = "Inventory updated successfully"; } else if (Inventoryinfo == 2) { apiObject.ReturnCode = Inventoryinfo; apiObject.ReturnMessage = "record is already updated by someone else"; } else { apiObject.ReturnCode = Inventoryinfo; apiObject.ReturnMessage = "Fail-Record Not Inserted"; } strResult = strReturnCode + "|" + strReturnMsg; return(apiObject); }
public ProductMasterModel ProductMaster_InsertUpdate(ArrayList paramList) { string strResult = ""; string strReturnCode = "000"; string strReturnMsg = "UnDefined"; ProductMasterModel apiObject = new ProductMasterModel(); apiObject = Newtonsoft.Json.JsonConvert.DeserializeObject <ProductMasterModel>(paramList[0].ToString()); string crCnString = UtilityLib.GetConnectionString(); int Processinfo = DL_ProductMaster.ProductInsert(crCnString, apiObject.Productid, apiObject.ProductName, apiObject.UOM, apiObject.Color, apiObject.Texture, apiObject.CreatedBy, apiObject.ProcessId, apiObject.BuyProductId, apiObject.BuyProductPacking, apiObject.Catagory, apiObject.CompanyId); if (Processinfo == 0) { apiObject.ReturnCode = Processinfo; apiObject.ReturnMessage = "Product Added Successfully"; } else if (Processinfo == 1) { apiObject.ReturnCode = Processinfo; apiObject.ReturnMessage = "Product already exists"; } else if (Processinfo == 101) { apiObject.ReturnCode = Processinfo; apiObject.ReturnMessage = "Product updated successfully"; } else if (Processinfo == 2) { apiObject.ReturnCode = Processinfo; apiObject.ReturnMessage = "record is already updated by someone else"; } else { apiObject.ReturnCode = Processinfo; apiObject.ReturnMessage = "Fail-Record Not Inserted"; } strResult = strReturnCode + "|" + strReturnMsg; return(apiObject); }
public RolesModel Roles_InsertUpdate(ArrayList paramList) { string strResult = ""; string strReturnCode = "000"; string strReturnMsg = "UnDefined"; RolesModel apiObject = new RolesModel(); apiObject = Newtonsoft.Json.JsonConvert.DeserializeObject <RolesModel>(paramList[0].ToString()); string crCnString = UtilityLib.GetConnectionString(); int RoleInfo = DAL_Roles.Roles_InsertUpdate(crCnString, apiObject.RoleId, apiObject.RoleName, apiObject.RoleCode, apiObject.UnderPrecedingRoleId, apiObject.AuthorizationRequired, apiObject.CompanyId); if (RoleInfo == 0) { apiObject.ReturnCode = RoleInfo; apiObject.ReturnMessage = "Role Added Successfully"; } else if (RoleInfo == 1) { apiObject.ReturnCode = RoleInfo; apiObject.ReturnMessage = "Role already exists"; } else if (RoleInfo == 101) { apiObject.ReturnCode = RoleInfo; apiObject.ReturnMessage = "Role updated successfully"; } else if (RoleInfo == 2) { apiObject.ReturnCode = RoleInfo; apiObject.ReturnMessage = "record is already updated by someone else"; } else { apiObject.ReturnCode = RoleInfo; apiObject.ReturnMessage = "Fail-Record Not Inserted"; } strResult = strReturnCode + "|" + strReturnMsg; return(apiObject); }
public FieldCodeModel FieldCode_InsertUpdate(ArrayList paramList) { string strResult = ""; string strReturnCode = "000"; string strReturnMsg = "UnDefined"; FieldCodeModel apiObject = new FieldCodeModel(); apiObject = Newtonsoft.Json.JsonConvert.DeserializeObject <FieldCodeModel>(paramList[0].ToString()); string crCnString = UtilityLib.GetConnectionString(); int FieldCodeInfo = DAL_FieldCode.FieldCode_InsertUpdate(crCnString, apiObject.FieldCodeId, apiObject.FieldClassId, apiObject.FieldCodeName, apiObject.FieldCodeAlias, apiObject.FieldCodeOrder, apiObject.CompanyId); if (FieldCodeInfo == 0) { apiObject.ReturnCode = FieldCodeInfo; apiObject.ReturnMessage = "Success"; } else if (FieldCodeInfo == 1) { apiObject.ReturnCode = FieldCodeInfo; apiObject.ReturnMessage = "Field Code already exists"; } else if (FieldCodeInfo == 101) { apiObject.ReturnCode = FieldCodeInfo; apiObject.ReturnMessage = "Field Code updated successfully"; } else if (FieldCodeInfo == 2) { apiObject.ReturnCode = FieldCodeInfo; apiObject.ReturnMessage = "record is already updated by someone else"; } else { apiObject.ReturnCode = FieldCodeInfo; apiObject.ReturnMessage = "Fail-Record Not Inserted"; } strResult = strReturnCode + "|" + strReturnMsg; return(apiObject); }
private IList <InventoryModel> fnInventory_List(InventoryModel apiObject, ref string strResult) { string strReturnCode = "000"; string strReturnMsg = "UnDefined"; string crCnString = UtilityLib.GetConnectionString(); IList <InventoryModel> objFieldClassModelList = new List <InventoryModel>(); DataSet usersInfoDS = DAL_Inventory.Inventory_List(crCnString, apiObject.RequestType, apiObject.SearchBy, apiObject.SearchString, apiObject.ReciptNo, apiObject.ComapnyId, 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 InventoryModel(); apiObject.ReciptNo = UtilityLib.FormatNumber(dr["ReciptNo"].ToString()); apiObject.FarmerId = UtilityLib.FormatNumber(dr["FarmerId"].ToString()); apiObject.LoginId = UtilityLib.FormatNumber(dr["LoginId"].ToString()); apiObject.PersonName = (string)dr["PersonName"]; apiObject.Quantity = UtilityLib.FormatNumber(dr["Qunatity"].ToString()); apiObject.Unit = (string)dr["Unit"]; apiObject.RawMaterial = (string)dr["RawMaterial"]; apiObject.Storage = UtilityLib.FormatNumber(dr["Storage"].ToString()); apiObject.CreatedDate = UtilityLib.FormatDate(dr["CreatedDate"]); //apiObject.CompanyId = (Guid)(dr["CompanyId"]); objFieldClassModelList.Add(apiObject); } } else { strReturnCode = "002"; strReturnMsg = "Fail-Record Not Found"; } strResult = strReturnCode + "|" + strReturnMsg; return(objFieldClassModelList); }
public RoleRightsModel Rights_InsertUpdate(ArrayList paramList) { string strResult = ""; string strReturnCode = "000"; string strReturnMsg = "UnDefined"; RoleRightsModel apiObject = new RoleRightsModel(); apiObject = Newtonsoft.Json.JsonConvert.DeserializeObject <RoleRightsModel>(paramList[0].ToString()); string crCnString = UtilityLib.GetConnectionString(); int RightsInfo = DAL_RoleRights.Rights_InsertUpdate(crCnString, apiObject.RoleRightsId, apiObject.RoleId, apiObject.ModuleId, apiObject.View, apiObject.Edit, apiObject.Create, apiObject.Delete, apiObject.CompanyId); if (RightsInfo == 0) { apiObject.ReturnCode = RightsInfo; apiObject.ReturnMessage = "Rights Added Successfully"; } else if (RightsInfo == 1) { apiObject.ReturnCode = RightsInfo; apiObject.ReturnMessage = "Rights already exists"; } else if (RightsInfo == 101) { apiObject.ReturnCode = RightsInfo; apiObject.ReturnMessage = "Rights updated successfully"; } else if (RightsInfo == 2) { apiObject.ReturnCode = RightsInfo; apiObject.ReturnMessage = "record is already updated by someone else"; } else { apiObject.ReturnCode = RightsInfo; apiObject.ReturnMessage = "Fail-Record Not Inserted"; } strResult = strReturnCode + "|" + strReturnMsg; return(apiObject); }
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 <UOMMasterModel> fnUOMMaster_List(UOMMasterModel apiObject, ref string strResult) { string strReturnCode = "000"; string strReturnMsg = "UnDefined"; string crCnString = UtilityLib.GetConnectionString(); IList <UOMMasterModel> objUOMMasterModelList = new List <UOMMasterModel>(); DataSet usersInfoDS = DAL_UOMMaster.UOMMaster_List(crCnString, apiObject.RequestType, apiObject.SearchBy, apiObject.SearchString, apiObject.IntID, 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 UOMMasterModel(); apiObject.UOMId = UtilityLib.FormatNumber(dr["UOMId"].ToString()); apiObject.UOMTypeId = UtilityLib.FormatNumber(dr["UOMTypeId"].ToString()); apiObject.DecimalPoints = UtilityLib.FormatNumber(dr["DecimalPoints"].ToString()); apiObject.BaseUnit = (bool)dr["BaseUnit"]; apiObject.ConversionRation = UtilityLib.FormatDecimal(dr["ConversionRation"].ToString()); apiObject.UOMName = (string)dr["UOMName"]; apiObject.UOMCode = (string)dr["UOMCode"]; apiObject.CompanyId = (Guid)(dr["CompanyId"]); objUOMMasterModelList.Add(apiObject); } } else { strReturnCode = "002"; apiObject.ReturnMessage = "Fail-Record Not Found"; } strResult = strReturnCode + "|" + strReturnMsg; return(objUOMMasterModelList); }
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); }
public ProcessMasterModel DeleteProcess(ArrayList paramList) { string strResult = ""; string strReturnCode = "000"; string strReturnMsg = "UnDefined"; ProcessMasterModel apiObject = new ProcessMasterModel(); apiObject = Newtonsoft.Json.JsonConvert.DeserializeObject <ProcessMasterModel>(paramList[0].ToString()); string crCnString = UtilityLib.GetConnectionString(); int Processinfo = DL_ProcessMaster.Delete_Process(crCnString, apiObject.ProcessId); if (Processinfo == 101) { apiObject.ReturnCode = Processinfo; apiObject.ReturnMessage = "Process delete successfully"; } else { apiObject.ReturnCode = Processinfo; apiObject.ReturnMessage = "Fail-Record Not Delete"; } strResult = strReturnCode + "|" + strReturnMsg; return(apiObject); }
public void FiveThousand_G_E() { UtilityLib obj = new UtilityLib(); Assert.AreEqual(2500, obj.calculateDiscount(5000)); }
public void OneThousand_Below() { UtilityLib obj = new UtilityLib(); Assert.AreEqual(999, obj.calculateDiscount(999)); }
public void TwoThousand() { UtilityLib obj = new UtilityLib(); Assert.AreNotEqual(1900, obj.calculateDiscount(2000)); }
public void OneThousand() { UtilityLib obj = new UtilityLib(); Assert.AreNotEqual(930, obj.calculateDiscount(1000)); }
public LockOnLib(AutoPilot _ap, float dScrn) { Util = new UtilityLib(ap, dScrn); this.ap = _ap; this.dScrn = dScrn; }