public JsonResult IsContractCodeExist(string ContractCode) { bool isexist = false; if (!string.IsNullOrEmpty(ContractCode)) { //if (!string.IsNullOrEmpty(existCode)) //{ //if (ChargeCode.ToLower() != existCode.ToLower()) //{ BCBSClient client = new BCBSClient(); isexist = client.CheckIsContractCodeExist(ContractCode); // } //} } return Json(!isexist, JsonRequestBehavior.AllowGet); }
public string GenerateUniqueContractCode() { string Result = string.Empty; Guid g = Guid.NewGuid(); Result = g.ToString().Substring(0, g.ToString().IndexOf('-')); BCBSClient client = new BCBSClient(); bool isexist = client.CheckIsContractCodeExist(Result); if (isexist) { GenerateUniqueContractCode(); } return Result; }