/// <summary> /// Updates Store Information /// </summary> /// <param name="VI">The New Store Information</param> public void UpdateStoreInfo(VendorInfo VI) { Send.SendToken(ServerConnection.ServerSock); Send.SendMessage(ServerConnection.ServerSock, "UpdateStoreInfo"); Send.SendVendorInfo(ServerConnection.ServerSock, VI); }
private void TransmitVendorToColumns(Worksheet original, out string errorMsg) { errorMsg = string.Empty; _vendorInfoList = new List <VendorInfo>(); IEnumerable <IGrouping <string, decimal> > query = _referenceDataList.GroupBy(e => e.VendorName, e => e.Amount); foreach (IGrouping <string, decimal> vendorGroup in query) { VendorInfo vendor = new VendorInfo { VendorName = vendorGroup.Key, ColumnIndex = 0 }; _vendorInfoList.Add(vendor); } if (_vendorInfoList.Count == 0) { errorMsg = $"合并{Library.ReferenceVendorColumn}数据出错!"; } int rowNumber = 1; int columnIndex = _originalLastColumnIndex; foreach (VendorInfo vendor in _vendorInfoList) { original.Cells[rowNumber, columnIndex].Value = vendor.VendorName; vendor.ColumnIndex = columnIndex; columnIndex++; } }
public VehicleTariffViewModel() { FriendlyMessage = new List <FriendlyMessage>(); Pager = new PaginationInfo(); VehicleTariff = new VehicleTariffInfo(); VehicleTariffs = new List <VehicleTariffInfo>(); VehicleTariffFilter = new VehcileTariffFilter(); VehicleTariffPriceDetail = new VehicleTariffPriceDetailsInfo(); VehicleTariffPriceDetails = new List <VehicleTariffPriceDetailsInfo>(); VehicleTariffCustomerCategory = new VehicleTariffCustomerCategoryDetailsInfo(); VehicleTariffCustomerCategories = new List <VehicleTariffCustomerCategoryDetailsInfo>(); Vendor = new VendorInfo(); Vendors = new List <VendorInfo>(); Vehicle = new VehicleInfo(); Vehicles = new List <VehicleInfo>(); CustomerCategory = new CustomerCategoryInfo(); CustomerCategories = new List <CustomerCategoryInfo>(); }
} // CheckHmrc private bool IsSameMarketPlace(int nMpID, byte[] oSecData, MP_MarketplaceType oMp, string sShopID) { VendorInfo vi = Integration.ChannelGrabberConfig.Configuration.Instance.GetVendorInfo(oMp.Name); if (vi == null) { return(false); } try { var am = Serialized.Deserialize <AccountModel>(Encrypted.Decrypt(oSecData)); return(am.Fill().UniqueID() == sShopID); } catch (Exception e) { string sXml = System.Text.Encoding.Default.GetString(oSecData); new SafeILog(this).Warn( e, "Failed to de-serialize security data. Marketplace ID = {0}, Security data: {1}", nMpID, sXml ); return(false); } // try } // IsSameMarketPlace
public void Init() { // Init Db, reduces waiting time on first user using (DatabaseContext db = new DatabaseContext()) { if (!db.Info.Any()) { VendorInfo TempVendorI = new VendorInfo(); TempVendorI.name = "FH-Salzburg"; ConnectorInfo TempConnI = new ConnectorInfo(); TempConnI.PeerUUID = Guid.NewGuid().ToString(); TempConnI.InstanceStartTime = 0; TempConnI.UpdateSeq = "relpace-with-latest-update-seq"; TempConnI.Version = "0.1.4"; TempConnI.Vendor = TempVendorI; try { db.Info.Add(TempConnI); // Check again, here we have a mad racing condition as pouchdb always checks twice if (!db.Info.Any()) { db.SaveChanges(); } } catch (Exception e) { Console.WriteLine("Error when adding data to Info, e: " + e.Message); } } } }
private void IsExistsCode(ISession session, VendorInfo vi) { ICriteria criteria = session.CreateCriteria(typeof(VendorInfo)); ICriterion criterion = null; if (vi.Id != Guid.Empty) { criterion = Restrictions.Not(Restrictions.IdEq(vi.Id)); criteria.Add(criterion); } criterion = Restrictions.Eq("VendorCode", vi.VendorCode); criteria.Add(criterion); //统计 criteria.SetProjection( Projections.ProjectionList() .Add(Projections.Count("Id")) ); int count = (int)criteria.UniqueResult(); if (count > 0) { throw new EasyJob.Tools.Exceptions.VendorInfoCodeIsExistsException();//供应商Code已经存在 } }
protected void Page_Load(Object sender, EventArgs e) { try { if ((Request.QueryString["vendorid"] != null) && (Request.QueryString["bannerid"] != null)) { int intVendorId = int.Parse(Request.QueryString["vendorid"]); int intBannerId = int.Parse(Request.QueryString["bannerid"]); string strURL = "~/" + Globals.glbDefaultPage; BannerController objBanners = new BannerController(); BannerInfo objBanner = objBanners.GetBanner(intBannerId, intVendorId, PortalSettings.PortalId); if (objBanner == null) { //Try a Host Banner objBanner = objBanners.GetBanner(intBannerId, intVendorId, Null.NullInteger); } if (objBanner != null) { if (!Null.IsNull(objBanner.URL)) { strURL = Globals.LinkClick(objBanner.URL, -1, -1, false); } else { VendorController objVendors = new VendorController(); VendorInfo objVendor = objVendors.GetVendor(objBanner.VendorId, PortalSettings.PortalId); if (objVendor == null) { //Try a Host Vendor objVendor = objVendors.GetVendor(objBanner.VendorId, Null.NullInteger); } if (objVendor != null) { if (!String.IsNullOrEmpty(objVendor.Website)) { strURL = Globals.AddHTTP(objVendor.Website); } } } } else { if (Request.UrlReferrer != null) { strURL = Request.UrlReferrer.ToString(); } } objBanners.UpdateBannerClickThrough(intBannerId, intVendorId); Response.Redirect(strURL, true); } } catch (Exception exc) //Page failed to load { Exceptions.ProcessPageLoadException(exc); } }
} // Name public override void Execute() { m_oCustomerData.Load(); Guid oEkmType = new EkmDatabaseMarketPlace().InternalId; Guid oYodleeType = new YodleeDatabaseMarketPlace().InternalId; VendorInfo oHmrc = global::Integration.ChannelGrabberConfig.Configuration.GetInstance(Log).Hmrc; m_oStra.Execute(); foreach (LoadCustomerMarketplaceSecurityData.ResultRow oRes in m_oStra.Result) { if (oRes.InternalID == oEkmType) { CheckEkm(oRes); } else if (oRes.InternalID == oYodleeType && oRes.DisplayName != "ParsedBank") { Result.HasYodlee = CurrentValues.Instance.RefreshYodleeEnabled; } else if (oRes.InternalID == oHmrc.Guid()) { CheckHmrc(oRes); } } // for each result Result.IsVatReturnUpToDate = new CheckAllVatReturnPeriods(m_oCustomerData.Id, DB, Log).IsUpToDate(); } // Execute
public VendorViewModel() { Vendor = new VendorInfo(); Vendors = new List <VendorInfo>(); Cities = new List <CityInfo>(); Designations = new List <DesignationInfo>(); Business = new List <BusinessInfo>(); BusinessList = new List <BusinessInfo>(); Filter = new VendorFilter(); ContactFilter = new ContactPersonFilter(); BankFilter = new BankFilter(); Pager = new PaginationInfo(); FriendlyMessage = new List <FriendlyMessage>(); ContactPerson = new ContactPerson(); ContactPersons = new List <ContactPerson>(); PaymentOptionList = new List <VendorInfo>(); }
private static int RegisterClient(object ClientInformation, int clientType) { //CI = HashPassword(CI); string sqlQuery; //Get Correct Query if (clientType == 1) { UserInfo userInfo = (UserInfo)ClientInformation; sqlQuery = ($@"INSERT INTO users (username, firstname, lastname, email, password, salt) VALUES ('{userInfo.Username}', '{userInfo.FirstName}', '{userInfo.LastName}', '{userInfo.Email}', '{userInfo.Password}', '{userInfo.Salt}');"); } else { VendorInfo vendorInfo = (VendorInfo)ClientInformation; sqlQuery = ($@"INSERT INTO vendors (`Name`, Description, Address, Email, Postcode, PhoneNo, `Password`, `Salt`) VALUES ('{vendorInfo.Name}', '{vendorInfo.Description}', '{vendorInfo.Address}', '{vendorInfo.Email}', '{vendorInfo.Postcode}', '{vendorInfo.PhoneNo}', '{vendorInfo.Password}', '{vendorInfo.Salt}');" ); } Data.DAL.ExecCommand(sqlQuery); //Execute Query if (Data.DAL.ErrorCode == 1062) { return(0); //Duplicate username } else if (Data.DAL.ErrorCode == -1) { return(1); //Successfully Registerd } else { return(3); //Undiagnosed Error } }
private (string mfg, string dev) DeviceIDLookup(string vendorID, string deviceID) { if (usbIDDictionary.ContainsKey(vendorID)) { VendorInfo vendor = usbIDDictionary[vendorID]; VendorDeviceInfo device = null; foreach (VendorDeviceInfo vendorDevice in vendor.Products) { if (vendorDevice.ID == deviceID) { device = vendorDevice; } } if (device != null) { return(vendor.Name, device.Name); } else { return(vendor.Name, null); } } return(null, null); }
public static void RegistrationHandler(Socket Client) { Console.WriteLine("Client Requested Register"); //Update Interface with new Request string regType = Receive.ReceiveMessage(Client); // RegType User || Vendor string registerValue; if (regType == "User") { //Starts Customer Registration Process UserInfo UserInformation = Receive.ReceiveUserInfo(Client); UserInformation = HashPassword(UserInformation); object userObj = UserInformation; registerValue = RegisterClient(userObj, 1).ToString(); } else if (regType == "Vendor") { //Starts Vendor Registration Process VendorInfo VendorInformation = Receive.ReceiveVendorInfo(Client); VendorInformation = HashPassword(VendorInformation); object venObj = VendorInformation; registerValue = RegisterClient(venObj, 2).ToString(); } else { return; //Invalid Message Received } Send.SendMessage(Client, registerValue); }
public VendorViewModel() { Vendor_Grid = new List <VendorInfo>(); Material_Vendor_Grid = new List <MaterialVendorInfo>(); Vendor = new VendorInfo(); Material_Vendor = new MaterialVendorInfo(); Friendly_Message = new List <FriendlyMessageInfo>(); Pager = new PaginationInfo(); States = new List <StateInfo>(); Nations = new List <NationInfo>(); Filter = new Vendor_Filter(); Material_Category = new List <MaterialCategoryInfo>(); Is_Primary = false; Attribute_Code = new AttributeCodeInfo(); Material_Category_Info = new MaterialCategoryInfo(); Materials = new List <MaterialInfo>(); }
private void My_first_event_handler(object sender, ExecutedRoutedEventArgs e) { if (purchaseList.Count > 0) { if (MessageBox.Show("Are you sure do you want to save purchase info?", "Confirm", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { PurchaseDetaiInfo purchaseDetailInfo = new PurchaseDetaiInfo(); //if (invoiceDate.SelectedDate != null) //{ // DateTime billDate = invoiceDate.SelectedDate ?? DateTime.Now; // if(billDate!=null) // { // purchaseDetailInfo.InvoiceDate = Convert.ToInt32(billDate.ToString("yyyyMMdd")); // } //} purchaseDetailInfo.InvoiceNum = txtInvoiceNum.Text; purchaseDetailInfo.PurchaseitemList = purchaseList.ToArray(); decimal totalAmount = 0; decimal.TryParse(txtTotalAmount.Text, out totalAmount); purchaseDetailInfo.TotalAmount = totalAmount; VendorInfo vendorInfo = (VendorInfo)autoVendorName.SelectedItem; if (vendorInfo != null) { purchaseDetailInfo.VendorID = vendorInfo.VendorID; } BLL.PurchaseBLL.InsertPurchaseInfo(purchaseDetailInfo); purchaseList = new List <BS_PurchaseService.PurchaseInfo>(); datagridProduct.ItemsSource = null; //this.autoProductName.Focus(); } } }
//public void Update_Product_Services(ProductVendorInfo productVendors) //{ // _sqlRepo.ExecuteNonQuery(Set_Values_In_Product_Vendors(productVendors), StoredProcedures.Update_Product_Vendors_sp.ToString(), CommandType.StoredProcedure); //} public VendorInfo Get_Vendor_By_Id(int vendor_Id) { VendorInfo vendors = new VendorInfo(); List <SqlParameter> sqlParams = new List <SqlParameter>(); sqlParams.Add(new SqlParameter("@Vendor_Id", vendor_Id)); DataTable dt = _sqlRepo.ExecuteDataTable(sqlParams, StoredProcedures.Get_Vendor_By_Id_Sp.ToString(), CommandType.StoredProcedure); if (dt != null && dt.Rows.Count > 0) { int count = 0; List <DataRow> drList = new List <DataRow>(); drList = dt.AsEnumerable().ToList(); count = drList.Count(); foreach (DataRow dr in drList) { vendors = Get_Vendor_Values(dr); // To bind vendor data } } return(vendors); }
protected void SelectVendor_Click(object sender, EventArgs e) { if (VendorList.SelectedIndex == 0) { MessageUserControl.ShowInfo("Select Error", "You must select a vendor."); Subtotal.Text = "0.00"; Tax.Text = "0.00"; Total.Text = "0.00"; Cancel_Click(sender, e); } else { MessageUserControl.TryRun(() => { int vendorid = int.Parse(VendorList.SelectedValue); PurchasingController sysmgr = new PurchasingController(); VendorInfo newinfo = sysmgr.Vendor_Info(vendorid); VName.Text = newinfo.VendorName; Contact.Text = newinfo.Contact; Phone.Text = newinfo.Phone; Comments.Text = newinfo.Comments; List <PurchaseOrder> order = sysmgr.Purchase_Order(vendorid); PurchaseOrderGV.DataSource = order; PurchaseOrderGV.DataBind(); calculatePOValue(); List <ProdCategoryInfo> inventory = sysmgr.ProdCategory_List(vendorid); ProdCatListDTO.DataSource = inventory; ProdCatListDTO.DataBind(); }, "Purchase Order Info", "Create purchase order for this vendor."); } }
private void LoginButton_Click_1(object sender, EventArgs e) { object OJ = FeedMeLogic.Server.AuthenticationHandler.AuthenticateLogin(UsernameTextBox.Text, PasswordTextBox.Text, 1); VendorDetails = (VendorInfo)OJ; //Re-Serialize CheckDetails(); }
public ActionResult DeleteConfirmed(int id) { VendorInfo vendorInfo = db.VendorInfoes.Find(id); db.VendorInfoes.Remove(vendorInfo); db.SaveChanges(); return(RedirectToAction("Index")); }
/// <summary> /// Gets HashData for Customer /// </summary> /// <param name="VendorInformation">VendorInfo Object which is local</param> /// <returns>VendorInfo Object with Hashed Password</returns> private static VendorInfo HashPassword(VendorInfo VendorInformation) { string[] HashData = Data.HashPass.HashPassword(VendorInformation.Password); VendorInformation.Password = HashData[0]; return(VendorInformation); }
/// <summary> /// Updates Store Information with the new received information /// </summary> /// <param name="clientSocket">Client Socket which requested update</param> internal static void UpdateStoreInfo(Socket clientSocket) { VendorInfo venData = Receive.ReceiveVendorInfo(clientSocket); string updateQuery = $@"UPDATE vendors SET `Name` = '{venData.Name}', `Description` = '{venData.Description}', `Address` = '{venData.Description}', `Email` = '{venData.Description}', `Postcode` = '{venData.Postcode}', `PhoneNo` = '{venData.PhoneNo}' WHERE vendorID = {venData.VendorID};"; DAL.ExecCommand(updateQuery); }
public int Insert_Vendor(VendorInfo vendors) { int Vendor_Id = 0; Vendor_Id = Convert.ToInt32(_sqlRepo.ExecuteScalerObj(Set_Values_In_Vendor(vendors), StoredProcedures.Insert_Vendor_sp.ToString(), CommandType.StoredProcedure)); return(Vendor_Id); }
private void OnVendorSelected(VendorInfo vendorInfo) { if (VendorSelected != null) { VendorSelectedEventArgs argsVendor = new VendorSelectedEventArgs(vendorInfo); VendorSelected(this, argsVendor); } }
private void autoVendorName_SelectionChanged(object sender, SelectionChangedEventArgs e) { VendorInfo vendorInfo = (VendorInfo)autoVendorName.SelectedItem; if (vendorInfo != null) { autoVendorName.Text = vendorInfo.VendorName; } }
public AddAccountState() { VendorInfo = null; AccountData = null; Marketplace = null; Error = null; Model = null; CustomerMarketPlace = null; } // constructor
public List <VendorHistoryLog> LoadVendorHistoryLogBySysNo(int vendorSysNo) { VendorInfo newVendorInfo = new VendorInfo() { SysNo = vendorSysNo }; return(VendorProcessor.LoadVendorHistoryLogInfo(newVendorInfo)); }
/// <summary> /// 更新供应商邮件地址(采购单-邮件地址维护用到.) /// </summary> /// <param name="info"></param> /// <param name="callback"></param> public void UpdateVendorMailAddress(VendorInfo info, EventHandler <RestClientEventArgs <object> > callback) { info.CompanyCode = CPApplication.Current.CompanyCode; info.CreateUserSysNo = CPApplication.Current.LoginUser.UserSysNo; info.CreateUserName = CPApplication.Current.LoginUser.DisplayName; string relativeUrl = "/POService/Vendor/UpdateVendorMailAddress"; restClient.Update(relativeUrl, info, callback); }
/// <summary> /// 解锁供应商信息 /// </summary> /// <param name="vendorInfo"></param> /// <param name="callback"></param> public void UnHoldVendor(VendorInfo vendorInfo, EventHandler <RestClientEventArgs <int> > callback) { vendorInfo.CompanyCode = CPApplication.Current.CompanyCode; vendorInfo.CreateUserSysNo = CPApplication.Current.LoginUser.UserSysNo; vendorInfo.CreateUserName = CPApplication.Current.LoginUser.DisplayName; string relativeUrl = "/POService/Vendor/UnHoldVendorInfo"; restClient.Update <int>(relativeUrl, vendorInfo, callback); }
private List <SqlParameter> Set_Values_In_Vendor(VendorInfo vendors) { List <SqlParameter> sqlParamList = new List <SqlParameter>(); sqlParamList.Add(new SqlParameter("@Vendor_Name", vendors.Vendor_Name)); sqlParamList.Add(new SqlParameter("@HeadOfficeAddress", vendors.HeadOfficeAddress)); sqlParamList.Add(new SqlParameter("@Head_Office_State", vendors.Head_Office_State)); sqlParamList.Add(new SqlParameter("@Head_Office_ZipCode", vendors.Head_Office_ZipCode)); sqlParamList.Add(new SqlParameter("@Head_Office_Nation", vendors.Head_Office_Nation)); sqlParamList.Add(new SqlParameter("@Head_Office_Landline1", vendors.Head_Office_Landline1)); sqlParamList.Add(new SqlParameter("@Head_Office_Landline2", vendors.Head_Office_Landline2)); sqlParamList.Add(new SqlParameter("@Head_Office_FaxNo", vendors.Head_Office_FaxNo)); sqlParamList.Add(new SqlParameter("@Email", vendors.Email)); //sqlParamList.Add(new SqlParameter("@Quality_Certification", vendors.Quality_Certification)); //sqlParamList.Add(new SqlParameter("@Quality_Certification_Year", vendors.Quality_Certification_Year)); //sqlParamList.Add(new SqlParameter("@Quality_Certification_Category", vendors.Quality_Certification_Category)); //sqlParamList.Add(new SqlParameter("@Performance_Certification", vendors.Performance_Certification)); //sqlParamList.Add(new SqlParameter("@Performance_Certification_Year", vendors.Performance_Certification_Year)); //sqlParamList.Add(new SqlParameter("@Performance_Certification_Category", vendors.Performance_Certification_Category)); // sqlParamList.Add(new SqlParameter("@Remark_about_Supplier", vendors.Remark_about_Supplier)); // sqlParamList.Add(new SqlParameter("@Block_Payment", vendors.Block_Payment)); // sqlParamList.Add(new SqlParameter("@Shipment_Methods", vendors.Shipment_Methods)); // sqlParamList.Add(new SqlParameter("@Flagged_Supplier", vendors.Flagged_Supplier)); //sqlParamList.Add(new SqlParameter("@Delivary_Term_Code", vendors.Delivary_Term_Code)); //sqlParamList.Add(new SqlParameter("@Is_Approved_By_Director", vendors.Is_Approved_By_Director)); //sqlParamList.Add(new SqlParameter("@Central_Excise_Registration_Details", vendors.Central_Excise_Registration_Details)); //sqlParamList.Add(new SqlParameter("@Registration_No", vendors.Registration_No)); //sqlParamList.Add(new SqlParameter("@Range", vendors.Range)); //sqlParamList.Add(new SqlParameter("@Division", vendors.Division)); //sqlParamList.Add(new SqlParameter("@PAN", vendors.PAN)); //sqlParamList.Add(new SqlParameter("@TAN", vendors.TAN)); //sqlParamList.Add(new SqlParameter("@Tax_Excemption_Code", vendors.Tax_Excemption_Code)); //sqlParamList.Add(new SqlParameter("@Currency_Code", vendors.Currency_Code)); //sqlParamList.Add(new SqlParameter("@VAT_Type", vendors.VAT_Type)); //sqlParamList.Add(new SqlParameter("@PaymentTerms", vendors.PaymentTerms)); sqlParamList.Add(new SqlParameter("@Is_Active", vendors.Is_Active)); sqlParamList.Add(new SqlParameter("@Product_Category", vendors.Product_Category)); sqlParamList.Add(new SqlParameter("@Code", vendors.Code)); if (vendors.Vendor_Id == 0) { sqlParamList.Add(new SqlParameter("@CreatedBy", vendors.CreatedBy)); } sqlParamList.Add(new SqlParameter("@UpdatedBy", vendors.UpdatedBy)); if (vendors.Vendor_Id != 0) { sqlParamList.Add(new SqlParameter("@Vendor_Id", vendors.Vendor_Id)); } return(sqlParamList); }
public VendorInfo GetVendorValues(DataRow dr) { VendorInfo retVal = new VendorInfo(); retVal.VendorId = Convert.ToInt32(dr["VendorId"]); retVal.VendorName = Convert.ToString(dr["VendorName"]); return(retVal); }
public List <VendorAgentInfo> GetVendorAgentInfo(string vendorSysNo) { int sysNo = int.TryParse(vendorSysNo, out sysNo) ? sysNo : 0; VendorInfo vendorInfo = new VendorInfo() { SysNo = sysNo }; return(ObjectFactory <VendorPortalManagerAppService> .Instance.GetVendorAgentInfo(vendorInfo)); }