Example #1
0
 public string Get_RefID(int Acc_No)
 {
     try
     {
         var res = db.sp_Generate_RefID(Acc_No);
         if (res > 0)
         {
             var data = db.User_Details.Where(x => x.Acc_No == Acc_No).SingleOrDefault();
             if (data == null)
             {
                 return("Error Occurerd during RefID generation. Contact Admin for more details..");
             }
             else
             {
                 return(data.Ref_ID);
             }
         }
         else
         {
             return("Error Occurerd during RefID generation. Contact Admin for more details..");
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }