public string SaveDetails(LUC obj) { string Manualauto = ""; if (obj.Manualauto == "1") { Manualauto = "A"; } else { Manualauto = "M"; } try { string UCR = ""; string UHF = ""; if (obj.Text_UHFCarrierCode != "111") { UHF = obj.Text_UHFCarrierCode + "-" + obj.Text_UHFNumber; } if (obj.Text_UCRCarrierCode != "111") { UCR = obj.Text_UCRCarrierCode + "-" + obj.Text_UCRNumber; } var time = obj.Text_IssuedDate + " " + obj.Text_IssuedTime; DateTime startdate = DateTime.Parse(time, new CultureInfo("en-us")); List <string> str = new List <string>(); SqlParameter[] Parameters = { new SqlParameter("@ULDTRANSNO", 0), new SqlParameter("@UCR", UCR), new SqlParameter("@UHF", UHF), new SqlParameter("@Originator", ""), new SqlParameter("@IssuedDate", obj.Text_IssuedDate), new SqlParameter("@IssuedTime", obj.Text_IssuedTime), new SqlParameter("@ControlReceiptNo", obj.hdnControlReceiptNo), new SqlParameter("@SendLocLHR", obj.hdnSendLocLHR), new SqlParameter("@status", obj.Text_status), new SqlParameter("@ULD", obj.ULD), new SqlParameter("@Name", obj.Text_Name), new SqlParameter("@IDNumber", obj.Text_IDNumber), new SqlParameter("@MobileNo", obj.Text_MobileNo), new SqlParameter("@SInfo1", obj.Text_SI1), new SqlParameter("@SInfo2", obj.Text_SI2), new SqlParameter("@LoadedBy", obj.Text_LoadedBy), new SqlParameter("@UpdatedBy", ((CargoFlash.Cargo.Model.UserLogin)(System.Web.HttpContext.Current.Session ["UserDetail"])).UserSNo.ToString()),new SqlParameter("@AutoChek",Manualauto), }; DataSet ds = SqlHelper.ExecuteDataset(DMLConnectionString.WebConfigConnectionString, CommandType.StoredProcedure, "spLUC", Parameters); return(ds.Tables[0].Rows[0][0].ToString()); } catch (Exception ex)// { throw ex; } }
public void MakeLUC() { var luc = new LUC(); for (int i = 0; i < 20; i++) { var v = luc.Next(); Console.WriteLine( v + " " + LUC.Safe62ToDec(v) + " " + LUC.DecToSafe62(LUC.Safe62ToDec(v))); } }
public void RepeatLUC() { var luc = new LUC(); var strs1 = new List <string>(); for (int i = 0; i < 50000; i++) { strs1.Add(luc.Next()); } var strs2 = new List <string>(); foreach (var s in strs1) { if (strs2.Contains(s)) { continue; } strs2.Add(s); } Console.WriteLine("repeat:" + (strs1.Count - strs2.Count)); }