public OrganisationToken(ltext token_prefix, string _Name, string _Tax_ID, string _Registration_ID, string _Atom_Office_Name, string _BankName, string _TRR, string _Email, string _HomePage, string _PhoneNumber, string _FaxNumber, byte[] _Logo_Data) { tName = new TemplateToken(token_prefix, new string[] { "Name", "Ime" }, _Name,null); tTax_ID = new TemplateToken(token_prefix, new string[] { "Tax_ID", "DavčnaŠtevilka" }, _Tax_ID, null); tRegistration_ID = new TemplateToken(token_prefix, new string[] { "Regsitration_ID", "MatičnaŠtevilka" }, _Registration_ID, null); tAtom_Office_Name = new TemplateToken(token_prefix, new string[] { "Office", "PoslovnaEnota" }, _Atom_Office_Name, null); tBankName = new TemplateToken(token_prefix, new string[] { "BankName", "Banka" }, _BankName, null); tTRR = new TemplateToken(token_prefix, new string[] { "BankAccount", "Bančni račun" }, _TRR, null); tEmail = new TemplateToken(token_prefix, new string[] { "Email", "Email" }, _Email, null); tHomePage = new TemplateToken(token_prefix, new string[] { "HomePage", "DomačaStran" }, _HomePage, null); tPhoneNumber = new TemplateToken(token_prefix, new string[] { "PhoneNumber", "Telefon" }, _PhoneNumber, null); tFaxNumber = new TemplateToken(token_prefix, new string[] { "FaxNumber", "Fax" }, _FaxNumber, null); tLogo_Data = new TemplateToken(token_prefix, new string[] { "Logo", "Logo" }, _Logo_Data, null); AddList(); }
public PersonToken(ltext token_prefix, bool Gender, string FirstName, string LastName, DateTime DateOfBirth, string Tax_ID, string Registration_ID, string MobilePhoneNumber, string PhoneNumber, string Email, string CardNumber, string CardType) { tGender = new TemplateToken(token_prefix, new string[] { "Gender", "Spol" }, DBTypes.func.GenderAsString(Gender), null); tFirstName = new TemplateToken(token_prefix, new string[] { "FirstName", "Ime" }, FirstName, null); tLastName = new TemplateToken(token_prefix, new string[] { "LastName", "Priimek" }, LastName, null); tDateOfBirth = new TemplateToken(token_prefix, new string[] { "DateOfBirth", "DatumRojstva" }, DBTypes.func.Get_DATE_dd_mm_yyyy(DateOfBirth), null); tTaxID = new TemplateToken(token_prefix, new string[] { "Tax_ID", "DavčnaŠtevilka" }, Tax_ID, null); tRegistration_ID = new TemplateToken(token_prefix, new string[] { "Registration_ID", "MatičnaŠtevilka" }, Registration_ID, null); tMobilePhoneNumber = new TemplateToken(token_prefix, new string[] { "MobilePhoneNumber", "MobilnaTelefonŠtevilka" }, MobilePhoneNumber, null); tPhoneNumber = new TemplateToken(token_prefix, new string[] { "PhoneNumber", "TelefonskaŠtevilka" }, PhoneNumber, null); tEmail = new TemplateToken(token_prefix, new string[] { "Email", "Email" }, Email, null); tCardNumber = new TemplateToken(token_prefix, new string[] { "CardNumber", "ŠtevilkaKartice" }, CardNumber, null); tCardType = new TemplateToken(token_prefix, new string[] { "CardType", "VrstaKartice" }, CardType, null); AddList(); }
public Address(ltext token_prefix, string _StreetName, string _HouseNumber, string _ZIP, string _City, string _Country, string _State ) { StreetName = _StreetName; HouseNumber = _HouseNumber; ZIP = _ZIP; City = _City; Country= _Country; State = _State; ltext ltAddress_prefix = token_prefix.AddAtTheEnd(lngToken.st_Address); token = new AddressToken(ltAddress_prefix, StreetName, HouseNumber, ZIP, City, Country, State ); }
public FVI_SLO_RealEstateBP(ltext token_prefix, int _BuildingNumber, int _BuildingSectionNumber, string _Community, int _CadastralNumber, DateTime _ValidityDate, string _ClosingTag, string _SoftwareSupplier_TaxNumber, string _PremiseType) { BuildingNumber = _BuildingNumber; BuildingSectionNumber = _BuildingSectionNumber; Community = _Community; CadastralNumber = _CadastralNumber; ValidityDate = _ValidityDate; ClosingTag = _ClosingTag; SoftwareSupplier_TaxNumber = _SoftwareSupplier_TaxNumber; PremiseType = _PremiseType; token = new FVI_SLO_RealEstateBPToken(token_prefix, BuildingNumber, BuildingSectionNumber, Community, CadastralNumber, ValidityDate, ClosingTag, SoftwareSupplier_TaxNumber, PremiseType); }
public Column(Column c) { obj = SetObject(c.obj); nulltype = c.nulltype; Style = c.Style; flags = c.flags; IsIdentity = c.IsIdentity; ownerTable = c.ownerTable; Name = c.Name; // Value = c.Value; //SetType = c.SetType; if (c.fKey != null) { fKey = new ForeignKey(c.fKey); } Name_in_language = c.Name_in_language; //Name_in_language = new ltext(); //int iCount = c.Name_in_language.sText.Length; //for (int i = 0; i < iCount; i++) //{ // Name_in_language.sText(i) = c.Name_in_language.sText(i); //} }
public usrc_RowReferencedFromTable_List_Dialog(List<usrc_RowReferencedFromTable> x_usrc_RowReferencedFromTable_List,SQLTable x_tbl,long x_id, ltext xInstruction) { InitializeComponent(); Instruction = xInstruction; m_usrc_RowReferencedFromTable_List = x_usrc_RowReferencedFromTable_List; m_tbl = x_tbl; id = x_id; if (m_usrc_RowReferencedFromTable_List!=null) { int y = 0; foreach (usrc_RowReferencedFromTable x_usrc_RowReferencedFromTable in m_usrc_RowReferencedFromTable_List) { x_usrc_RowReferencedFromTable.Top = y; x_usrc_RowReferencedFromTable.Left = 2; x_usrc_RowReferencedFromTable.BorderStyle = BorderStyle.Fixed3D; x_usrc_RowReferencedFromTable.Width = pnl_usrc_RowReferencedTable_List.Width - 4; x_usrc_RowReferencedFromTable.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; x_usrc_RowReferencedFromTable.Visible = true; pnl_usrc_RowReferencedTable_List.Controls.Add(x_usrc_RowReferencedFromTable); y += x_usrc_RowReferencedFromTable.Height + 2; } } this.btn_Yes.Text = lngRPM.s_Yes.s; this.btn_No.Text = lngRPM.s_No.s; }
public AddressToken(ltext token_prefix) { tStreet = new TemplateToken(token_prefix, new string[] { "Street", "Cesta" }, "", null); tHouseNumber = new TemplateToken(token_prefix, new string[] { "HouseNumber", "HišnaŠtevilka" }, "", null); tZIP = new TemplateToken(token_prefix, new string[] { "ZIP", "Pošta" }, "", null); tCity = new TemplateToken(token_prefix, new string[] { "City", "Kraj" }, "", null); tCountry= new TemplateToken(token_prefix, new string[] { "Country", "Država" }, "", null); tState = new TemplateToken(token_prefix, new string[] { "State", "Dežela" }, "", null); AddList(); }
public Organisation(ltext token_prefix, string _Name, string _Tax_ID, string _Registration_ID, string _Atom_Office_Name, string _BankName, string _TRR, string _Email, string _HomePage, string _PhoneNumber, string _FaxNumber, byte[] _Logo_Data, string _StreetName, string _HouseNumber, string _ZIP, string _City, string _Country, string _State ) { Name = _Name; Tax_ID = _Tax_ID; Registration_ID = _Registration_ID; Atom_Office_Name = _Atom_Office_Name; BankName = _BankName; TRR = _TRR; Email = _Email; HomePage = _HomePage; PhoneNumber = _PhoneNumber; FaxNumber = _FaxNumber; Logo_Data = _Logo_Data; ltext token_prefix_Organisation = token_prefix.AddAtTheEnd(lngToken.st_Organisation); Address = new Address(token_prefix_Organisation, _StreetName, _HouseNumber, _ZIP, _City, _Country, _State); token = new OrganisationToken(token_prefix_Organisation, Name, Tax_ID, Registration_ID, Atom_Office_Name, BankName, TRR, Email, HomePage, PhoneNumber, FaxNumber, Logo_Data); }
public Form_complex_text_edit(ltext xltext) { InitializeComponent(); m_ltext = xltext; if (m_ltext.complex_text_list!=null) { int y = 2; int x = 10; foreach (object o in m_ltext.complex_text_list) { if (o is ltext) { Button btn = new Button(); btn.Text = "Edit"; btn.Width = BTN_WIDTH; btn.Height = BTN_HEIGHT; btn.Left = x; btn.Top = y; btn.Tag = o; btn.Click += btn_Click; Label lbl = new Label(); string s = ((ltext)o).GetText(0); if (s.Length < MAX_LBL_STRING_LENGTH) { lbl.Text = s; } else { lbl.Text = s.Substring(0, MAX_LBL_STRING_LENGTH) + " ..."; } lbl.Width = LBL_WIDTH; lbl.Left = btn.Left + btn.Width + CTRL_DISTANCE; lbl.Top = btn.Top; lbl.Height = btn.Height; this.Controls.Add(btn); this.Controls.Add(lbl); } else if (o is string) { Label lbl = new Label(); lbl.Text = (string)o; lbl.Width = LBL_WIDTH; lbl.Left = x + BTN_WIDTH + CTRL_DISTANCE; lbl.Top = y; lbl.Height = LBL_HEIGHT; this.Controls.Add(lbl); } y += ITEM_HEIGHT + CTRL_DISTANCE; } } else { bclose = true; } }
public Address(ltext token_prefix) { StreetName = ""; HouseNumber = ""; ZIP = ""; City = ""; Country= ""; State = ""; ltext ltAddress_prefix = token_prefix.AddAtTheEnd(lngToken.st_Address); token = new AddressToken(ltAddress_prefix); }
public Person(ltext token_prefix, bool _Gender, string _FirstName, string _LastName, DateTime _DateOfBirth, string _Tax_ID, string _Registration_ID, string _MobilePhoneNumber, string _PhoneNumber, string _Email, string _CardNumber, string _CardType, byte[] _PersonImage, string _StreetName, string _HouseNumber, string _ZIP, string _City, string _Country, string _State ) { Gender = _Gender; FirstName = _FirstName; LastName = _LastName; DateOfBirth = _DateOfBirth; Tax_ID = _Tax_ID; Registration_ID = _Registration_ID; MobilePhoneNumber = _MobilePhoneNumber; PhoneNumber = _PhoneNumber; Email = _Email; CardNumber = _CardNumber; CardType = _CardType; PersonImage = _PersonImage; ltext token_prefix_Person = token_prefix.AddAtTheEnd(lngToken.st_Person); Address = new Address(token_prefix_Person, _StreetName, _HouseNumber, _ZIP, _City, _Country, _State); token = new PersonToken(token_prefix_Person, Gender, FirstName, LastName, DateOfBirth, Tax_ID, Registration_ID, MobilePhoneNumber, PhoneNumber, Email, CardNumber, CardType); }
public static DialogResult Show(bool bStartup,IWin32Window owner, ltext xltext, string caption, MessageBoxButtons buttons, object oIcon, MessageBoxDefaultButton defaultButton) { Form_Box dlg = new Form_Box(owner, xltext, caption, buttons, oIcon, defaultButton); if (bStartup) { dlg.TopMost = true; } else { checkTopMost(owner, dlg); } return dlg.ShowDialog(); }
public static DialogResult Show(IWin32Window owner,bool bStartup,ltext xltext) { Form_Box dlg = new Form_Box(owner,xltext); if (bStartup) { dlg.TopMost = true; } else { checkTopMost(owner, dlg); } return dlg.ShowDialog(); }
public ISO_3166(string xName, string xA2, string xA3, int xNumber, string xISO_STANDARD,string xCurrency_Name,string xCurrency_Abbreviation, string xCurrency_Symbol,int xCurrency_Code, int xCurrency_DecimalPlaces, string Slo_name) { m_Name = xName; m_A2 = xA2; m_A3 = xA3; m_Number = xNumber; m_ISO_STANDARD = xISO_STANDARD; m_Currency_Name = xCurrency_Name; m_Currency_Abbreviation = xCurrency_Abbreviation; m_Currency_Symbol = xCurrency_Symbol; m_Currency_Code = xCurrency_Code; m_Currency_DecimalPlaces = xCurrency_DecimalPlaces; s_Name_In_Language = new ltext(xName, Slo_name); }
public ItemSold(ltext token_prefix, ltext lt_StoreDivision, string _Item_Name, decimal _RetailPricePerUnit, string _UnitName, decimal _RetailPricePerUnitWithDiscount, string _TaxationName, decimal _dQuantity, decimal _Discount, decimal _ExtraDiscount, string _CurrencySymbol, decimal _TaxationRate, decimal _TotalDiscount, decimal _NetPrice, decimal _TaxPrice, decimal _PriceWithTax ) { StoreDivision = lt_StoreDivision.s; Item_Name = _Item_Name; RetailPricePerUnit = _RetailPricePerUnit; UnitName = _UnitName; RetailPricePerUnitWithDiscount = _RetailPricePerUnitWithDiscount; TaxationName = _TaxationName; dQuantity = _dQuantity; Discount = _Discount; ExtraDiscount = _ExtraDiscount; CurrencySymbol = _CurrencySymbol; TaxationRate = _TaxationRate; TotalDiscount = _TotalDiscount; NetPrice = _NetPrice; TaxPrice = _TaxPrice; PriceWithTax = _PriceWithTax; ltext token_ItemSold = token_prefix.AddAtTheEnd(lngToken.st_Item); token = new ItemSoldToken(token_ItemSold, lt_StoreDivision, _Item_Name, _RetailPricePerUnit, _UnitName, _RetailPricePerUnitWithDiscount, _TaxationName, _dQuantity, _Discount, _ExtraDiscount, _CurrencySymbol, _TaxationRate, _TotalDiscount, _NetPrice, _TaxPrice, _PriceWithTax); }
public PersonToken(ltext token_prefix) { tGender = new TemplateToken(token_prefix, new string[] { "Gender", "Spol" }, "",null); tFirstName = new TemplateToken(token_prefix, new string[] { "FirstName", "Ime" }, "", null); tLastName = new TemplateToken(token_prefix, new string[] { "LastName", "Priimek" }, "", null); tDateOfBirth = new TemplateToken(token_prefix, new string[] { "DateOfBirth", "DatumRojstva" }, "", null); tTaxID = new TemplateToken(token_prefix, new string[] { "Tax_ID", "DavčnaŠtevilka" }, "", null); tRegistration_ID = new TemplateToken(token_prefix, new string[] { "Registration_ID", "MatičnaŠtevilka" }, "", null); tMobilePhoneNumber = new TemplateToken(token_prefix, new string[] { "MobilePhoneNumber", "MobilnaTelefonŠtevilka" }, "", null); tPhoneNumber = new TemplateToken(token_prefix, new string[] { "PhoneNumber", "TelefonskaŠtevilka" }, "", null); tEmail = new TemplateToken(token_prefix, new string[] { "Email", "Email" }, "", null); tCardNumber = new TemplateToken(token_prefix, new string[] { "CardNumber", "ŠtevilkaKartice" }, "", null); tCardType = new TemplateToken(token_prefix, new string[] { "CardType", "VrstaKartice" }, "", null); AddList(); }
public Form_ltext_Edit(ltext xltext, ref string[] sText) { // TODO: Complete member initialization InitializeComponent(); this.ltext = xltext; m_sText = sText; dt_Translations.Columns.Add("ID", typeof(int)); dt_Translations.Columns.Add(lngRPM.s_Language.s, typeof(string)); dt_Translations.Columns.Add(lngRPM.s_Text_in_language.s, typeof(string)); int icount = m_sText.Count(); for (int i =0;i<icount;i++) { DataRow dr = dt_Translations.NewRow(); dr[0] = i; dr[1] = DynSettings.s_language.GetText(i); dr[2] = xltext.GetText(i); dt_Translations.Rows.Add(dr); } dgv_Lng.DataSource = dt_Translations; dt_Translations.AcceptChanges(); }
bool myGroupBox_RowReferenceFromTable_Check_NoChangeToOther(SQLTable pSQL_Table, List<usrc_RowReferencedFromTable> usrc_RowReferencedFromTable_List, ID_v id_v, ref bool bCancelDialog, ref ltext Instruction) { if (pParentTable != null) { return pParentTable.myGroupBox.SetEvent_RowReferenceFromTable_Check_NoChangeToOther(pSQL_Table, usrc_RowReferencedFromTable_List, id_v, ref bCancelDialog, ref Instruction); } else { bCancelDialog = false; return false; } }
public Person(ltext token_prefix) { Gender = false; FirstName = ""; LastName = ""; DateOfBirth = DateTime.MinValue; Tax_ID = ""; Registration_ID = ""; MobilePhoneNumber = ""; PhoneNumber = ""; Email = ""; CardNumber = ""; CardType = ""; PersonImage = null; ltext token_prefix_Person = token_prefix.AddAtTheEnd(lngToken.st_Person); Address = new Address(token_prefix_Person); token = new PersonToken(token_prefix_Person); }
public bool Set(long DocProformaInvoice_ID, ref ltext ltMsg) { ltMsg = null; if (m_MethodOfPayment != null) { if (m_MethodOfPayment.Set()) { if (m_TermsOfPayment != null) { if (m_TermsOfPayment.Set()) { List<SQL_Parameter> lpar = new List<SQL_Parameter>(); string spar_MethodOfPayment_ID = "@par_MethodOfPayment_ID"; SQL_Parameter par_MethodOfPayment_ID = new SQL_Parameter(spar_MethodOfPayment_ID, SQL_Parameter.eSQL_Parameter.Bigint, false, m_MethodOfPayment.ID); lpar.Add(par_MethodOfPayment_ID); string spar_TermsOfPayment_ID = "@par_TermsOfPayment_ID"; SQL_Parameter par_TermsOfPayment_ID = new SQL_Parameter(spar_TermsOfPayment_ID, SQL_Parameter.eSQL_Parameter.Bigint, false, m_TermsOfPayment.ID); lpar.Add(par_TermsOfPayment_ID); string spar_DocDuration = "@par_DocDuration"; SQL_Parameter par_DocDuration = new SQL_Parameter(spar_DocDuration, SQL_Parameter.eSQL_Parameter.Bigint, false, m_Duration.length); lpar.Add(par_DocDuration); string spar_DocDurationType = "@par_DocDurationType"; SQL_Parameter par_DocDurationType = new SQL_Parameter(spar_DocDurationType, SQL_Parameter.eSQL_Parameter.Int, false, m_Duration.type); lpar.Add(par_DocDurationType); string spar_IssueDate = "@par_IssueDate"; SQL_Parameter par_IssueDate = new SQL_Parameter(spar_IssueDate, SQL_Parameter.eSQL_Parameter.Datetime, false, m_IssueDate.Date); lpar.Add(par_IssueDate); string sql = "update DocProformaInvoice set MethodOfPayment_ID = " + spar_MethodOfPayment_ID + ", TermsOfPayment_ID = " + spar_TermsOfPayment_ID + ", DocDuration = " + spar_DocDuration + ", DocDurationType = " + spar_DocDurationType + ", IssueDate = " + spar_IssueDate + " where ID = " + DocProformaInvoice_ID.ToString(); object ores = null; string Err = null; if (DBSync.DBSync.ExecuteNonQuerySQL(sql, lpar, ref ores, ref Err)) { return true; } else { LogFile.Error.Show("ERROR:TangentaDB:DocProformaInvoice_AddOn:Set:sql=" + sql + "\r\nErr=" + Err); return false; } } else { return false; } } else { ltMsg = lngRPM.s_TermsOfPayment_are_not_defined; return true; } } else { return false; } } else { ltMsg = lngRPM.s_MethodOfPayment_is_not_defined; return true; } }
private bool usrc_EditTable_SimpleItem_RowReferenceFromTable_Check_NoChangeToOther(SQLTable pSQL_Table, List<usrc_RowReferencedFromTable> usrc_RowReferencedFromTable_List, CodeTables.ID_v id_v, ref bool bCancelDialog, ref ltext Instruction) { if (pSQL_Table.TableName.ToLower().Equals("taxation")) { if (pSQL_Table.pParentTable!=null) { if (pSQL_Table.pParentTable.TableName.ToLower().Equals("price_simpleitem")) { string sql = "select Name from Taxation where id = " + id_v.v.ToString(); DataTable dt = new DataTable(); string Err = null; if (DBSync.DBSync.ReadDataTable(ref dt,sql,ref Err)) { if (dt.Rows.Count>0) { string staxname = (string)dt.Rows[0]["Name"]; List<object> complex_text = new List<object>(); complex_text.Add(lngRPM.s_Tax_with_name); complex_text.Add("\""+staxname +"\""); complex_text.Add(lngRPM.s_belongs_to_many_other_trade_items_and_services); complex_text.Add(lngRPM.s_If_you_want_to_change_the_tax_only_to_the_selected_article___); if (Instruction == null) { Instruction = new ltext(complex_text); } else { Instruction.complex_text_list =complex_text; } } } else { LogFile.Error.Show("ERROR:usrc_PriceList_Edit:usrc_EditTable_SimpleItem_RowReferenceFromTable_Check_NoChangeToOther:\r\nsql=" + sql + "\r\nErr=" + Err); } } } } bCancelDialog = false; return false; }
internal bool Edit(ref ltext xltext) { Form_ltext_Edit dlgedit = new Form_ltext_Edit(this, ref xltext.m_sText); return dlgedit.ShowDialog() == DialogResult.Yes; }
public void sText(ltext tokenInLanguage) { int i = 0; int iCount = m_sText.Length; for (i = 0; i < iCount; i++) { if (i < tokenInLanguage.sText_Length) { m_sText[i] = tokenInLanguage.sText(i); } } }
public ltext AddAtTheEnd(ltext st_Address) { int i = 0; ltext lt = null; int iCount = this.m_sText.Count(); for (i=0;i< iCount;i++) { if (this.m_sText[i]!=null) { if (lt==null) { lt = new ltext(); } lt.m_sText[i] = this.m_sText[i]; if (st_Address.m_sText[i]!=null) { lt.m_sText[i] = this.m_sText[i] + "_" + st_Address.m_sText[i]; } else { lt.m_sText[i] = this.m_sText[i]; } } } return lt; }
public InvoiceCreateToken(string[] TokenInLanguage, string Replacement) { lt = new ltext(); lt.sText = TokenInLanguage; replacement = Replacement; }
public static UniversalInvoice.Person GetData(ltext token_prefix, long Atom_Customer_Person_ID) { string Err = null; UniversalInvoice.Person univ_per = null; string sql = @"select Atom_Customer_Person_$_aper_$$Gender, Atom_Customer_Person_$_aper_$_acfn_$$FirstName, Atom_Customer_Person_$_aper_$_acln_$$LastName, Atom_Customer_Person_$_aper_$$DateOfBirth, Atom_Customer_Person_$_aper_$$Tax_ID, Atom_Customer_Person_$_aper_$$Registration_ID, Atom_Customer_Person_$_aper_$_agsmnper_$$GsmNumber, Atom_Customer_Person_$_aper_$_aphnnper_$$PhoneNumber, Atom_Customer_Person_$_aper_$_aemailper_$$Email, Atom_Customer_Person_$_aper_$_acadrper_$_astrnper_$$StreetName, Atom_Customer_Person_$_aper_$_acadrper_$_ahounper_$$HouseNumber, Atom_Customer_Person_$_aper_$_acadrper_$_acitper_$$City, Atom_Customer_Person_$_aper_$_acadrper_$_azipper_$$ZIP, Atom_Customer_Person_$_aper_$_acadrper_$_astper_$$Country, Atom_Customer_Person_$_aper_$_acadrper_$_acouper_$$State, Atom_Customer_Person_$_aper_$$CardNumber, Atom_Customer_Person_$_aper_$_acardtper_$$CardType, Atom_Customer_Person_$_aper_$_aperimg_$$Image_Data from Atom_Customer_Person_VIEW where ID = " + Atom_Customer_Person_ID.ToString(); DataTable dt = new DataTable(); if (DBSync.DBSync.ReadDataTable(ref dt, sql, null, ref Err)) { if (dt.Rows.Count > 0) { univ_per = new UniversalInvoice.Person(token_prefix, DBTypes.tf._set_bool(dt.Rows[0]["Atom_Customer_Person_$_aper_$$Gender"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_acfn_$$FirstName"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_acln_$$LastName"]), DBTypes.tf._set_DateTime(dt.Rows[0]["Atom_Customer_Person_$_aper_$$DateOfBirth"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$$Tax_ID"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$$Registration_ID"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_agsmnper_$$GsmNumber"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_aphnnper_$$PhoneNumber"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_aemailper_$$Email"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$$CardNumber"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_acardtper_$$CardType"]), DBTypes.tf._set_byte_array(dt.Rows[0]["Atom_Customer_Person_$_aper_$_aperimg_$$Image_Data"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_acadrper_$_astrnper_$$StreetName"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_acadrper_$_ahounper_$$HouseNumber"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_acadrper_$_azipper_$$ZIP"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_acadrper_$_acitper_$$City"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_acadrper_$_astper_$$Country"]), DBTypes.tf._set_string(dt.Rows[0]["Atom_Customer_Person_$_aper_$_acadrper_$_acouper_$$State"])); return univ_per; } else { return null; } } else { LogFile.Error.Show("ERROR:f_Atom_Person:GetData:sql=" + sql + "\r\nErr=" + Err); } return null; }
public ItemSoldToken( ltext token_prefix, ltext lt_StoreDivision, string _Item_Name, decimal _RetailPricePerUnit, string _UnitName, decimal _RetailPricePerUnitWithDiscount, string _TaxationName, decimal _dQuantity, decimal _Discount, decimal _ExtraDiscount, string _CurrencySymbol, decimal _TaxationRate, decimal _TotalDiscount, decimal _NetPrice, decimal _TaxPrice, decimal _PriceWithTax) { tStoreDivision = new TemplateToken(token_prefix, new string[] { "StoreDivision", "OddelekProdaje" }, lt_StoreDivision.s, null); tItemName = new TemplateToken(token_prefix, new string[] { "Name", "Ime" }, _Item_Name, null); tPricePerUnit = new TemplateToken(token_prefix, new string[] { "PricePerUnit", "CenaNaEnoto" }, _RetailPricePerUnit.ToString(), null); tUnit = new TemplateToken(token_prefix, new string[] { "Unit", "MerskaEnota" }, _UnitName, null); tDiscount = new TemplateToken(token_prefix, new string[] {"Discount", "Popust" }, _Discount.ToString(), null); tDiscountPercent = new TemplateToken(token_prefix, new string[] { "DiscountPercent", "PopustVProcentih" }, (_Discount*100).ToString()+"%", null); tExtraDiscount = new TemplateToken(token_prefix, new string[] { "ExtraDiscount", "DodatniPopust" }, _ExtraDiscount.ToString(), null); tExtraDiscountPercent = new TemplateToken(token_prefix, new string[] { "ExtraDiscountPercent", "DodatniPopustVProcentih" }, (_ExtraDiscount*100).ToString()+"%", null); tCurrency = new TemplateToken(token_prefix, new string[] { "Currency", "Valuta" }, _CurrencySymbol, null); if (_dQuantity >= 0) { tQuantity = new TemplateToken(token_prefix, new string[] { "Quantity", "Količina" }, _dQuantity.ToString(), null); } else { tQuantity = new TemplateToken(token_prefix, new string[] { "Quantity", "Količina" }, "", null); } tTaxationRate = new TemplateToken(token_prefix, new string[] { "TaxationRate", "DavčnaStopnja" }, _TaxationRate.ToString(), null); tTaxationRatePercent = new TemplateToken(token_prefix, new string[] { "TaxationRatePercent", "DavčnaStopnjaVProcentih" }, (_TaxationRate*100).ToString()+"%", null); tTotalDiscount = new TemplateToken(token_prefix, new string[] { "TotalDiscount", "CelotenPopust" }, _TotalDiscount.ToString(), null); tTotalDiscountPercent = new TemplateToken(token_prefix, new string[] { "TotalDiscountPercent", "CelotenPopustVProcentih" }, (_TotalDiscount * 100).ToString() + "%", null); tNetPrice = new TemplateToken(token_prefix, new string[] { "NetPrice", "Cena_Brez_DDV" }, _NetPrice.ToString(), null); tTax = new TemplateToken(token_prefix, new string[] { "Tax", "Davek" }, _TaxPrice.ToString(), null); tPriceWithTax = new TemplateToken(token_prefix, new string[] { "PriceWithTax", "Cena_z_DDV" }, _PriceWithTax.ToString(), null); list = new List<TemplateToken>(); list.Add(tStoreDivision); list.Add(tItemName); list.Add(tPricePerUnit); list.Add(tUnit); list.Add(tDiscount); list.Add(tDiscountPercent); list.Add(tExtraDiscount); list.Add(tExtraDiscountPercent); list.Add(tCurrency); list.Add(tQuantity); list.Add(tTaxationRate); list.Add(tTaxationRatePercent); list.Add(tTotalDiscount); list.Add(tTotalDiscountPercent); list.Add(tNetPrice); list.Add(tTax); list.Add(tPriceWithTax); }
public EditControl(DynGroupBox xgrp_box, object refobj, string xName, ltext lt_label, ltext lt_val, ltext lt_help) { m_grp_box = xgrp_box; m_lt_help = lt_help; this.MinEditBoxWidth = m_grp_box.MinEditBoxWidth; this.LeftMargin = m_grp_box.LeftMargin; this.RightMargin = m_grp_box.RightMargin; this.TopMargin = m_grp_box.TopMargin; this.VerticalDistance = m_grp_box.VerticalDistance; this.HorisontalDistance = m_grp_box.HorisontalDistance; this.lblVerticalOffset = m_grp_box.lblVerticalOffset; this.TxtVerticalOffsetToLabel = m_grp_box.VerticalOffsetToLabel; this.HorisontallOffsetToLabel = m_grp_box.HorisontallOffsetToLabel; this.ColorChanged = m_grp_box.ColorChanged; this.ColorNotChanged = m_grp_box.ColorNotChanged; m_refobj = refobj; m_Name = xName; lbl = new Label(); if (m_refobj is dstring_v) { if (xName.Equals("MyOrg_Person_Password")) { edit_control = new Password.usrc_Password(); bool bltValDefined = false; if (lt_val != null) { if (lt_val.s != null) { bltValDefined = true; } } if (bltValDefined) { ((Password.usrc_Password)edit_control).Text = ((Password.usrc_Password)edit_control).LockPassword(lt_val.s); ((dstring_v)m_refobj).v = lt_val.s; } else { edit_control.Text = ((dstring_v)m_refobj).vs; } ((dstring_v)m_refobj).defined = true; } else { edit_control = new TextBox(); bool bltValDefined = false; if (lt_val != null) { if (lt_val.s != null) { bltValDefined = true; } } if (bltValDefined) { edit_control.Text = lt_val.s; ((dstring_v)m_refobj).v = lt_val.s; } else { edit_control.Text = ((dstring_v)m_refobj).vs; } ((dstring_v)m_refobj).defined = true; } } else if (m_refobj is dbool_v) { if (xName.Equals("MyOrg_Person_Gender")) { edit_control = new usrc_SelectGender(); ((usrc_SelectGender)edit_control).RadioButton1IsTrue = true; ((usrc_SelectGender)edit_control).RadioButton1_Text = lngRPM.s_Male.s; ((usrc_SelectGender)edit_control).RadioButton2_Text = lngRPM.s_Female.s; if (((dbool_v)m_refobj).defined) { ((usrc_SelectGender)edit_control).Checked = ((dbool_v)m_refobj).v; } } else { edit_control = new CheckBox(); ((CheckBox)edit_control).Text = ""; if (((dbool_v)m_refobj).defined) { ((CheckBox)edit_control).Checked = ((dbool_v)m_refobj).v; } } } else if (m_refobj is dDateTime_v) { edit_control = new DateTimePicker(); edit_control.Text = ""; ((DateTimePicker)edit_control).Value = DateTime.Now; ((dDateTime_v)m_refobj).v = ((DateTimePicker)edit_control).Value; } else if (m_refobj is dshort_v) { edit_control = new usrc_NumericUpDown(false); ((usrc_NumericUpDown)edit_control).Minimum = 0; ((usrc_NumericUpDown)edit_control).Maximum = 100000; ((usrc_NumericUpDown)edit_control).Value = Convert.ToDecimal(((dshort_v)m_refobj).v); ((dshort_v)m_refobj).v = Convert.ToInt16(((usrc_NumericUpDown)edit_control).Value); } else if (m_refobj is dbyte_array_v) { edit_control = new usrc_GetImage(); if (m_refobj!=null) { if (((dbyte_array_v)m_refobj).v != null) { ImageConverter ic = new ImageConverter(); ((usrc_GetImage)edit_control).Image = (Image)ic.ConvertFrom(((dbyte_array_v)m_refobj).v); Image_Hash = ((usrc_GetImage)edit_control).Image_Hash; } } } else { LogFile.Error.Show("ERROR:EditControl:unsuported type: m_refobj type =" + m_refobj.GetType().ToString()); return; } lbl.Name = "lbl_" + m_grp_box.Name + "_" + m_Name; lbl.Font = m_grp_box.Font; edit_control.Name = "txt_" + m_grp_box.Name + "_" + m_Name; edit_control.Font = m_grp_box.Font; lbl.AutoSize = false; lbl.Text = lt_label.s + ":"; SizeF size_lbl = lbl.CreateGraphics().MeasureString(lbl.Text, lbl.Font); SizeF size_txt = lbl.CreateGraphics().MeasureString(edit_control.Text, edit_control.Font); lbl.Width = (int)Math.Ceiling(size_lbl.Width); lbl.Height = (int)Math.Ceiling(size_lbl.Height); if ((m_refobj is dstring_v)) { edit_control.Width = MinEditBoxWidth; if (edit_control is TextBox) { int txt_calculated_width = (int)Math.Ceiling(size_txt.Width) + 4; if (edit_control.Width < txt_calculated_width) { edit_control.Width = txt_calculated_width; } } else if (edit_control is Password.usrc_Password) { edit_control.Width = 128; } } this.Width = lbl.Width + m_HorisontallOffsetToLabel + edit_control.Width; if (m_grp_box.EditControlsList == null) { m_grp_box.EditControlsList = new List<EditControl>(); } m_grp_box.EditControlsList.Add(this); int EditControlsList_Count = m_grp_box.EditControlsList.Count; if (EditControlsList_Count == 1) { this.pPrev = null; this.pNext = null; } else if (EditControlsList_Count > 1) { this.pPrev = m_grp_box.EditControlsList[EditControlsList_Count - 2]; m_grp_box.EditControlsList[EditControlsList_Count - 2].pNext = this; this.pNext = null; } m_grp_box.Controls.Add(lbl); m_grp_box.Controls.Add(edit_control); if (m_grp_box.tooltip != null) { m_grp_box.tooltip.SetToolTip(edit_control, lt_help.s); m_grp_box.tooltip.SetToolTip(lbl, lt_help.s); } }
private bool m_usrc_EditTable_RowReferenceFromTable_Check_NoChangeToOther(SQLTable pSQL_Table, List<usrc_RowReferencedFromTable> usrc_RowReferencedFromTable_List, CodeTables.ID_v id_v, ref bool bCancelDialog, ref ltext Instruction) { bCancelDialog = true; if (pSQL_Table.TableName.Equals("Stock")) { return false; } else { return true; } }
private bool usrc_EditTable_RowReferenceFromTable_Check_NoChangeToOther(CodeTables.SQLTable pSQL_Table, System.Collections.Generic.List<CodeTables.usrc_RowReferencedFromTable> usrc_RowReferencedFromTable_List, CodeTables.ID_v id_v, ref bool bCancelDialog, ref ltext Instruction) { bCancelDialog = false; return false; }