protected override void Render(HtmlTextWriter writer)
 {
     if ((ProductId != null) && (ProductId != DBNull.Value))
     {
         SiteSettings siteSettings = SettingsManager.GetSiteSettings(HiContext.Current.User.UserId);
         if (IsGroupBuyProduct)
         {
             base.NavigateUrl = "http://" + siteSettings.SiteUrl + Globals.GetSiteUrls().UrlData.FormatUrl("groupBuyProductDetails", new object[] { ProductId });
         }
         else if (IsCountDownProduct)
         {
             base.NavigateUrl = "http://" + siteSettings.SiteUrl + Globals.GetSiteUrls().UrlData.FormatUrl("countdownProductsDetails", new object[] { ProductId });
         }
         else if (unSale)
         {
             base.NavigateUrl = "http://" + siteSettings.SiteUrl + Globals.GetSiteUrls().UrlData.FormatUrl("unproductdetails", new object[] { ProductId });
         }
         else
         {
             base.NavigateUrl = "http://" + siteSettings.SiteUrl + Globals.GetSiteUrls().UrlData.FormatUrl("productDetails", new object[] { ProductId });
         }
     }
     if ((!imageLink && (ProductId != null)) && (ProductId != DBNull.Value))
     {
         base.Text = ProductName.ToString();
     }
     base.Target = "_blank";
     base.Render(writer);
 }
Example #2
0
 protected override void Render(HtmlTextWriter writer)
 {
     if ((ProductId != null) && (ProductId != DBNull.Value))
     {
         if (isGroupBuyProduct)
         {
             base.NavigateUrl = Globals.GetSiteUrls().UrlData.FormatUrl("groupBuyProductDetails", new object[] { ProductId });
         }
         else if (IsCountDownProduct)
         {
             base.NavigateUrl = Globals.GetSiteUrls().UrlData.FormatUrl("countdownProductsDetails", new object[] { ProductId });
         }
         else if (isUn)
         {
             base.NavigateUrl = Globals.GetSiteUrls().UrlData.FormatUrl("unproductdetails", new object[] { ProductId });
         }
         else
         {
             base.NavigateUrl = Globals.GetSiteUrls().UrlData.FormatUrl("productDetails", new object[] { ProductId });
         }
     }
     if ((!imageLink && (ProductId != null)) && (ProductId != DBNull.Value))
     {
         if (StringLenth.HasValue && (ProductName.ToString().Length > StringLenth.Value))
         {
             base.Text = ProductName.ToString().Substring(0, StringLenth.Value) + "...";
         }
         else
         {
             base.Text = ProductName.ToString();
         }
     }
     base.Target = "_blank";
     base.Render(writer);
 }
Example #3
0
 private void txtBusar_TextChanged(object sender, EventArgs e)
 {
     try
     {
         this.departamentoBindingSource.Filter = "CodDepartamento like '%" + txtBusar.Text + "%' or Departamento like '%" + txtBusar.Text + "%'";
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, ProductName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #4
0
 private void TicketForm_Load(object sender, EventArgs e)
 {
     staffNames.Text = Global.Staff.Name + " " + Global.Staff.Surname;
     LoadStaffUser();
     LoadCalls();
     this.Text = ProductName.ToString() + " " + ProductVersion.ToString();
     //configuration conf = new configuration();
     //conf.LoadConfig();
     //if (Global.Staff.Role == "Admin")
     //{
     //    Tab1.TabPages.Insert(3,tabLogs);
     //    MessageBox.Show("Admin");
     //}
     //else
     //{
     //    Tab1.TabPages.Remove(tabLogs);
     //}
 }
Example #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            String ProductName, ProductID, Email, Amount;

            ProductName = textBox1.Text;
            ProductID   = textBox2.Text;
            Email       = textBox3.Text;
            Amount      = textBox4.Text;
            if (ProductName.Length == 0 || ProductName.Length > 30)
            {
                errorProvider1.SetError(textBox1, " Please Enter Valid ProductName ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (ProductID.Length == 0 || ProductID.Length > 30)
            {
                errorProvider1.SetError(textBox2, " Please Enter Valid ProductID ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (Email.Length == 0 || Email.Length > 30)
            {
                errorProvider1.SetError(textBox3, " Please Enter Valid Email ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (Amount.Length == 0)
            {
                errorProvider1.SetError(textBox4, " Please Enter Valid Amount ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else
            {
                con.Open();
                errorProvider1.Clear();
                cmd.Connection = con;
                SqlCommand myCommand = new SqlCommand("insert into Supply values ('" +
                                                      ProductName.ToString() + "','" + ProductID.ToString() + "','" + Email.ToString() + "','" + Int32.Parse(Amount.ToString()) + "')", con);
                int success = myCommand.ExecuteNonQuery();
                if (success == 1)
                {
                    MessageBox.Show(success + " row has been inserted ");
                }
                con.Close();
            }
        }
Example #6
0
 private void eliminarToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvDepartamento.CurrentRow != null)
         {
             int Id = int.Parse(dgvDepartamento.CurrentRow.Cells[0].Value.ToString());
             if (MessageBox.Show("Desea eliminar el depatartamento", ProductName.ToString(), MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 this.departamentoTableAdapter.Delete(Id);
                 MessageBox.Show("Se ha eliminado correctamente el departamento", ProductName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
                 this.departamentoTableAdapter.Fill(dsCatalagos.Departamento);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, ProductName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #7
0
 private void eliminarToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvAreaEquipo.CurrentRow != null)
         {
             if (MessageBox.Show("Desea eliminar el Area Equipo", ProductName.ToString(), MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 Consultas con = new Consultas();
                 con.AreaEquipo_Delete(int.Parse(dgvAreaEquipo.CurrentRow.Cells[0].Value.ToString()));
                 MessageBox.Show("Se ha eliminado correctamente el area equipo", ProductName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
                 this.areaEquipoTableAdapter.Fill(dsCatalagos.AreaEquipo);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, ProductName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #8
0
 private void btnGuardar_Click(object sender, EventArgs e)
 {
     try
     {
         if (Funciones.esValido(gbRegistro))
         {
             Consultas con = new Consultas();
             con.AreaEquipo_Insert(int.Parse(cboArea.SelectedValue.ToString()), int.Parse(CboEquipo.SelectedValue.ToString()));
             MessageBox.Show("Se ha guardado el registro", ProductName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.areaEquipoTableAdapter.Fill(dsCatalagos.AreaEquipo);
             Funciones.Limpiar(gbRegistro);
             cboArea.PromptText   = "Seleccione";
             CboEquipo.PromptText = "Seleccione";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, ProductName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #9
0
 private void btnGuardar_Click(object sender, EventArgs e)
 {
     if (Funciones.esValido(gbRegistro))
     {
         if (IdDepartamento == 0)
         {
             this.departamentoTableAdapter.Insert(txtCodigoDepartamento.Text, txtDepartamento.Text);
             MessageBox.Show("Se ha guardado el departamento", ProductName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
             Funciones.Limpiar(gbRegistro);
             this.departamentoTableAdapter.Fill(this.dsCatalagos.Departamento);
         }
         else
         {
             this.departamentoTableAdapter.Update(txtCodigoDepartamento.Text, txtDepartamento.Text, IdDepartamento);
             MessageBox.Show("Se ha modificado el departamento", ProductName.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
             btnCancelar.Enabled = false;
             lTitulo.Text        = "Registrar departamento";
             Funciones.Limpiar(gbRegistro);
             this.departamentoTableAdapter.Fill(this.dsCatalagos.Departamento);
         }
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            String ProductID, OrderID, ID, CustomerNumber, Amount, Price, ProductName;

            ProductID      = textBox1.Text;
            OrderID        = textBox2.Text;
            ID             = textBox3.Text;
            CustomerNumber = textBox4.Text;
            Amount         = textBox5.Text;
            Price          = textBox6.Text;
            ProductName    = textBox7.Text;
            if (ProductID.Length == 0 || ProductID.Length > 30)
            {
                errorProvider1.SetError(textBox1, " Please Enter Valid ProductID ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (OrderID.Length == 0 || OrderID.Length > 30)
            {
                errorProvider1.SetError(textBox2, " Please Enter Valid OrderID ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (ID.Length == 0 || ID.Length > 30)
            {
                errorProvider1.SetError(textBox3, " Please Enter Valid ID ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (CustomerNumber.Length == 0)
            {
                errorProvider1.SetError(textBox4, " Please Enter Valid CustomerID ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (Amount.Length == 0)
            {
                errorProvider1.SetError(textBox5, " Please Enter Valid Amount ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (Price.Length == 0)
            {
                errorProvider1.SetError(textBox6, " Please Enter Valid Price ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else if (ProductName.Length == 0 || ProductName.Length > 30)
            {
                errorProvider1.SetError(textBox7, " Please Enter Valid ProductName ");
                errorProvider1.BlinkStyle = ErrorBlinkStyle.AlwaysBlink;
            }
            else
            {
                con.Open();
                errorProvider1.Clear();
                cmd.Connection = con;
                SqlCommand myCommand = new SqlCommand("insert into Orders values ('" +
                                                      ProductID.ToString() + "','" + OrderID.ToString() + "','" + ID.ToString() + "','" + Int32.Parse(CustomerNumber.ToString())
                                                      + "','" + Int32.Parse(Amount.ToString()) + "','" + float.Parse(Price.ToString()) + "','" + ProductName.ToString() + "')", con);
                int success = myCommand.ExecuteNonQuery();
                if (success == 1)
                {
                    MessageBox.Show(success + " row has been inserted ");
                }
                con.Close();
            }
        }
Example #11
0
        //Кнопка меню "Печать лимитной карты"
        private void печатьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            tabControl1.SelectedTab = Лимитка;

            if (dataGridView3.RowCount == 0)
            {
                MessageBox.Show("Лимитная карта пуста", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            string    CountOfLimitCard = "1";
            DataTable dataTable1       = new DataTable();

            object oMissing = System.Reflection.Missing.Value;

            Word.Documents WordDocuments;
            Word.Document  WordDocument;

            try
            {
                //Создаем объект Word - равносильно запуску Word
                WordApp = new Word.Application();
                //Делаем его видимым
                WordApp.Visible = true;

                Object template     = Type.Missing;
                Object newTemplate  = false;
                Object documentType = Word.WdNewDocumentType.wdNewBlankDocument;
                Object visible      = true;

                Object defaultTableBehavior = Word.WdDefaultTableBehavior.wdWord9TableBehavior;
                Object autoFitBehavior      = Word.WdAutoFitBehavior.wdAutoFitWindow;

                WordDocument = WordApp.Documents.Add(
                    ref template, ref newTemplate, ref documentType, ref visible);

                string ProductName, LimitCardName = "", LimitCardDate = "";
                ProductName = comboBox1.SelectedItem.ToString();
                ProductName = ProductName.Remove(0, ProductName.IndexOf(" ") + 2);
                ProductName = ProductName.Remove(ProductName.IndexOf("[") - 1);

                dataTable1.Clear();

                dbAdapter = new OleDbDataAdapter(
                    @"SELECT Лимитки.Объем, Лимитки.НомерЛимитки, Лимитки.ДатаСоставления 
                        FROM  Лимитки 
                        WHERE Лимитки.КодЛимитки = " + dataGridView2[0, dataGridView2.CurrentRow.Index].Value.ToString() /*[0, i - 2].Value.ToString()*/ + " ;",
                    dbCon);
                dbAdapter.Fill(dataTable1);

                foreach (DataRow Row in dataTable1.Rows)
                {
                    CountOfLimitCard = Row[0].ToString();
                    LimitCardName    = Row[1].ToString();
                    LimitCardDate    = Row[2].ToString();
                }
                LimitCardDate = LimitCardDate.Remove(LimitCardDate.IndexOf(" "));
                LimitCardName = LimitCardName.Replace("/", ".");
                LimitCardName = LimitCardName.Replace("\\", ".");
                LimitCardName = LimitCardName.Replace("|", ".");
                LimitCardName = LimitCardName.Replace("?", ".");
                LimitCardName = LimitCardName.Replace(":", ".");
                LimitCardName = LimitCardName.Replace("*", ".");
                LimitCardName = LimitCardName.Replace("<", ".");
                LimitCardName = LimitCardName.Replace(">", ".");
                LimitCardName = LimitCardName.Replace("\"", "'");

                ProductName = ProductName.Replace("/", ".");
                ProductName = ProductName.Replace("\\", ".");
                ProductName = ProductName.Replace("|", ".");
                ProductName = ProductName.Replace("?", ".");
                ProductName = ProductName.Replace(":", ".");
                ProductName = ProductName.Replace("*", ".");
                ProductName = ProductName.Replace("<", ".");
                ProductName = ProductName.Replace(">", ".");
                ProductName = ProductName.Replace("\"", "'");

                string FN       = ProductName.ToString() + @" лим " + LimitCardName.ToString() + @" " + CountOfLimitCard.ToString() + @".docx";
                object fileName = FN;
                WordDocument.SaveAs(ref fileName, ref oMissing, ref oMissing, ref oMissing,
                                    ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
                                    ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
                                    ref oMissing, ref oMissing);

                WordApp.Selection.TypeParagraph();
                //wordrange.Font.Color = Word.WdColor.wdColorRed;
                WordApp.Selection.Font.Name = "Times New Roman";
                WordApp.Selection.Font.Size = 14;
                WordApp.Selection.Font.Bold = 1;
                WordApp.Selection.TypeText(ProductName + " Лимитка " + LimitCardName + " " + CountOfLimitCard + " - шт. от " + LimitCardDate);
                WordApp.Selection.TypeParagraph();
                WordApp.Selection.Font.Size = 12;
                WordApp.Selection.Font.Bold = 0;
                WordApp.Selection.TypeText("Лимитная ведомость");
                WordApp.Selection.TypeParagraph();
                WordApp.Selection.Font.Size = 10;

                int rowCount    = dataGridView3.RowCount,
                    NumRowCount = 1;
                bool CycleFlag  = true;

                //Добавляем таблицу и получаем объект wordtable
                Word.Table WordTable = WordDocument.Tables.Add(WordApp.Selection.Range, 1 /*rowCount*/, 8,
                                                               ref defaultTableBehavior, ref autoFitBehavior);

                WordApp.Selection.PageSetup.Orientation            = Word.WdOrientation.wdOrientLandscape;
                WordApp.Application.Selection.PageSetup.LeftMargin = 20f;

                //Форматирование документа
                //
                //Настройка ширины столбцов таблицы

                /*
                 * ПЕРЕНЕСЕНО ПОСЛЕ ЗАПОЛНЕНИЯ ТАБЛИЦЫ ДАННЫМИ
                 * WordTable.Columns[1].SetWidth(15.9f, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                 * WordTable.Columns[2].SetWidth(142.2f, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                 * WordTable.Columns[3].SetWidth(233.9f, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                 * WordTable.Columns[4].SetWidth(108, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                 * WordTable.Columns[5].SetWidth(54, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                 * WordTable.Columns[6].SetWidth(39, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                 * WordTable.Columns[7].SetWidth(108, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                 * WordTable.Columns[8].SetWidth(83.9f, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                 */

                //dbCon.Open();

                Word.Range WordCellRange;

                //WordCellRange.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;

                //Заполнение "шапки" таблицы
                WordCellRange      = WordTable.Cell(1, 1).Range;
                WordCellRange.Text = "№";

                WordCellRange      = WordTable.Cell(1, 2).Range;
                WordCellRange.Text = "Наименование";

                WordCellRange      = WordTable.Cell(1, 3).Range;
                WordCellRange.Text = "Обозначение";

                WordCellRange      = WordTable.Cell(1, 4).Range;
                WordCellRange.Text = "Допустимая замена";

                WordCellRange      = WordTable.Cell(1, 5).Range;
                WordCellRange.Text = "Прим.";

                WordCellRange      = WordTable.Cell(1, 6).Range;
                WordCellRange.Text = "*" + CountOfLimitCard;

                WordCellRange      = WordTable.Cell(1, 7).Range;
                WordCellRange.Text = "Кол/цена";

                WordCellRange      = WordTable.Cell(1, 8).Range;
                WordCellRange.Text = "Дата";
                //
                //
                //WordTable.Rows[1].Range.Borders[Word.WdBorderType.wdBorderBottom].LineWidth = Word.WdLineWidth.wdLineWidth225pt;

                //Заполнение таблицы данными
                while (CycleFlag)
                {
                    WordTable.Rows.Add(ref oMissing);//Добавление новой строки в таблицу

                    //WordTable.Rows[WordTable.Rows.Count].Range.Borders[Word.WdBorderType.wdBorderBottom].LineWidth = Word.WdLineWidth.wdLineWidth225pt;

                    WordCellRange      = WordTable.Cell(WordTable.Rows.Count, 1).Range;
                    WordCellRange.Text = NumRowCount.ToString();

                    WordCellRange = WordTable.Cell(WordTable.Rows.Count, 2).Range;
                    //Наименование
                    WordCellRange.Text = dataGridView3[2, NumRowCount - 1].Value.ToString();

                    WordCellRange = WordTable.Cell(WordTable.Rows.Count, 3).Range;
                    //Обозначение
                    WordCellRange.Text = dataGridView3[1, NumRowCount - 1].Value.ToString();

                    WordCellRange = WordTable.Cell(WordTable.Rows.Count, 4).Range;
                    //Допустимая замена
                    //WordCellRange.Text = Change;

                    WordCellRange = WordTable.Cell(WordTable.Rows.Count, 5).Range;
                    //WordCellRange.Text = "Прим.";
                    WordCellRange.Text = dataGridView3[3, NumRowCount - 1].Value.ToString();

                    WordCellRange = WordTable.Cell(WordTable.Rows.Count, 6).Range;
                    //WordCellRange.Text = "*";
                    WordCellRange.Text = dataGridView3[4, NumRowCount - 1].Value.ToString();

                    WordCellRange = WordTable.Cell(WordTable.Rows.Count, 7).Range;
                    //WordCellRange.Text = "Кол/цена";

                    WordCellRange = WordTable.Cell(WordTable.Rows.Count, 8).Range;
                    //WordCellRange.Text = "Дата";

                    dataTable1 = new DataTable();
                    //dataTable1.Clear();

                    dbAdapter = new OleDbDataAdapter(
                        @"SELECT СоставСборки.Элемент, СоставСборки.Объем, ROUND(СоставСборки.Объем * " + CountOfLimitCard + @",2) AS Объем 
                        FROM Элементы INNER JOIN СоставСборки ON Элементы.КодЭлемента = СоставСборки.КодЭлемента 
                        WHERE Элементы.КодЭлемента = " + dataGridView3[0, NumRowCount - 1].Value.ToString() + ";", dbCon);

                    dbAdapter.Fill(dataTable1);

                    foreach (DataRow Row in dataTable1.Rows)
                    {
                        DataTable dataTable2 = new DataTable();
                        dbAdapter = new OleDbDataAdapter(
                            @"SELECT Элементы.ОбозначениепоКД, ТипыЭлементов.Название
                        FROM ТипыЭлементов INNER JOIN Элементы ON ТипыЭлементов.КодТипа = Элементы.КодТипа 
                        WHERE Элементы.КодЭлемента = " + Row[0].ToString() + ";", dbCon);
                        dbAdapter.Fill(dataTable2);

                        foreach (DataRow Row2 in dataTable2.Rows)
                        {
                            WordTable.Rows.Add(ref oMissing);//Добавление новой строки в таблицу

                            WordCellRange = WordTable.Cell(WordTable.Rows.Count, 2).Range;
                            //Наименование
                            WordCellRange.Text = Row2[1].ToString();

                            WordCellRange = WordTable.Cell(WordTable.Rows.Count, 3).Range;
                            //Обозначение
                            WordCellRange.Text = Row2[0].ToString();

                            WordCellRange = WordTable.Cell(WordTable.Rows.Count, 5).Range;
                            //WordCellRange.Text = "Прим.";
                            WordCellRange.Text = Row[1].ToString();

                            WordCellRange = WordTable.Cell(WordTable.Rows.Count, 6).Range;
                            //WordCellRange.Text = "*";
                            WordCellRange.Text = Row[2].ToString();
                        }
                    }

                    NumRowCount++;
                    if (NumRowCount == rowCount + 1)//Проверка на выход из цикла
                    {
                        CycleFlag = false;
                    }
                }


                //Настройка ширины столбцов таблицы
                WordTable.Columns[1].SetWidth(15.9f, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                WordTable.Columns[2].SetWidth(142.2f, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                WordTable.Columns[3].SetWidth(233.9f, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                WordTable.Columns[4].SetWidth(108, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                WordTable.Columns[5].SetWidth(54, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                WordTable.Columns[6].SetWidth(39, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                WordTable.Columns[7].SetWidth(108, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);
                WordTable.Columns[8].SetWidth(83.9f, Microsoft.Office.Interop.Word.WdRulerStyle.wdAdjustNone);

                object rStart = 0;
                object rEnd   = WordDocument.Content.End;
                WordDocument.Range(ref rStart, ref rEnd).InsertAfter("\n0 - расход материалов – “по потребности”");

                //dbCon.Close();
            }
            catch (Exception exception)
            {
                //MessageBox.Show("Невозможно создать документ Word", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                MessageBox.Show(exception.Message + "\nМетод:\n" + exception.TargetSite.ToString(), "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #12
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("PaidCallBalance(");
        bool __first = true;

        if (__isset.productType)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ProductType: ");
            ProductType.ToString(sb);
        }
        if (ProductName != null && __isset.productName)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ProductName: ");
            ProductName.ToString(sb);
        }
        if (Unit != null && __isset.unit)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Unit: ");
            Unit.ToString(sb);
        }
        if (__isset.limitedPaidBalance)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("LimitedPaidBalance: ");
            LimitedPaidBalance.ToString(sb);
        }
        if (__isset.limitedFreeBalance)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("LimitedFreeBalance: ");
            LimitedFreeBalance.ToString(sb);
        }
        if (__isset.unlimitedPaidBalance)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("UnlimitedPaidBalance: ");
            UnlimitedPaidBalance.ToString(sb);
        }
        if (__isset.unlimitedFreeBalance)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("UnlimitedFreeBalance: ");
            UnlimitedFreeBalance.ToString(sb);
        }
        if (__isset.startTime)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("StartTime: ");
            StartTime.ToString(sb);
        }
        if (__isset.endTime)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("EndTime: ");
            EndTime.ToString(sb);
        }
        if (__isset.autopayEnabled)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("AutopayEnabled: ");
            AutopayEnabled.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }
Example #13
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("PaidCallDialing(");
        bool __first = true;

        if (__isset.type)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Type: ");
            Type.ToString(sb);
        }
        if (DialedNumber != null && __isset.dialedNumber)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("DialedNumber: ");
            DialedNumber.ToString(sb);
        }
        if (ServiceDomain != null && __isset.serviceDomain)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ServiceDomain: ");
            ServiceDomain.ToString(sb);
        }
        if (__isset.productType)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ProductType: ");
            ProductType.ToString(sb);
        }
        if (ProductName != null && __isset.productName)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ProductName: ");
            ProductName.ToString(sb);
        }
        if (__isset.multipleProduct)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("MultipleProduct: ");
            MultipleProduct.ToString(sb);
        }
        if (__isset.callerIdStatus)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("CallerIdStatus: ");
            CallerIdStatus.ToString(sb);
        }
        if (__isset.balance)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Balance: ");
            Balance.ToString(sb);
        }
        if (Unit != null && __isset.unit)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Unit: ");
            Unit.ToString(sb);
        }
        if (__isset.rate)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Rate: ");
            Rate.ToString(sb);
        }
        if (DisplayCode != null && __isset.displayCode)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("DisplayCode: ");
            DisplayCode.ToString(sb);
        }
        if (CalledNumber != null && __isset.calledNumber)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("CalledNumber: ");
            CalledNumber.ToString(sb);
        }
        if (CalleeNationalNumber != null && __isset.calleeNationalNumber)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("CalleeNationalNumber: ");
            CalleeNationalNumber.ToString(sb);
        }
        if (CalleeCallingCode != null && __isset.calleeCallingCode)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("CalleeCallingCode: ");
            CalleeCallingCode.ToString(sb);
        }
        if (RateDivision != null && __isset.rateDivision)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("RateDivision: ");
            RateDivision.ToString(sb);
        }
        if (__isset.adMaxMin)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("AdMaxMin: ");
            AdMaxMin.ToString(sb);
        }
        if (__isset.adRemains)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("AdRemains: ");
            AdRemains.ToString(sb);
        }
        if (AdSessionId != null && __isset.adSessionId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("AdSessionId: ");
            AdSessionId.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }