Exemplo n.º 1
0
 private void PrintReport()
 {
     try
     {
         DataTable dtData;
         string    reportName = "APQPReport";
         if (!PartNo.IsNotNullOrEmpty())
         {
             ShowInformationMessage(PDMsg.NotEmpty("Part No"));
             return;
         }
         dtData = DvAPQP.ToTable().Copy();
         //dtData.Rows.Clear();
         DataSet dsReport = new DataSet();
         dsReport.DataSetName = "DSAPQPDATA";
         //dtData.Rows.Clear();
         dsReport.Namespace = "APQP";
         dtData.TableName   = "APQP";
         dsReport.Tables.Add(dtData);
         //dsReport.WriteXml("E:\\APQP.xml", XmlWriteMode.WriteSchema);
         Dictionary <string, string> dictFormula = new Dictionary <string, string>();
         dictFormula.Add("PartNo", "SFL Part No : " + PartNo);
         frmReportViewer reportViewer = new frmReportViewer(dsReport, reportName, CrystalDecisions.Shared.ExportFormatType.NoFormat, dictFormula);
         if (!reportViewer.ReadyToShowReport)
         {
             return;
         }
         reportViewer.ShowDialog();
     }
     catch (Exception ex)
     {
         throw ex.LogException();
     }
 }
Exemplo n.º 2
0
 private void Save()
 {
     try
     {
         if (!PartNo.IsNotNullOrEmpty())
         {
             ShowInformationMessage(PDMsg.NotEmpty("Part No"));
             return;
         }
         PartNumberIsFocused  = true;
         Mouse.OverrideCursor = Cursors.Wait;
         DvAPQP.ToTable().AcceptChanges();
         if (_aPQPBll.Save(DvAPQP.ToTable().Copy(), PartNo) == true)
         {
             Mouse.OverrideCursor = null;
             ShowInformationMessage(PDMsg.UpdatedSuccessfully);
             // ClearAll();
         }
     }
     catch (Exception ex)
     {
         throw ex.LogException();
     }
     finally
     {
         Mouse.OverrideCursor = null;
     }
 }
        private async void BtnGuardarBOMSDetalles_Clicked(object sender, EventArgs e)
        {
            string connectionString = ConfigurationManager.AppSettings["ipServer"];

            try
            {
                var BOMDIDV      = bomID;
                var PartNOV      = PartNo.Text;
                var DIEV         = DIE.Text;
                var ItemV        = Item.Text;
                var DescriptionV = Descripcion.Text;
                var UnitV        = Unit.Text;
                var UsageV       = Usage.Text;
                var CostV        = Costo.Text;
                var ExtV         = Ext.Text;

                if (string.IsNullOrEmpty(PartNOV))
                {
                    await DisplayAlert("Validacion", "Asegurarse de Ingresar el PartNo", "Aceptar");

                    PartNo.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(DIEV))
                {
                    await DisplayAlert("Validacion", "Asegurarse de Ingresar el DIE", "Aceptar");

                    DIE.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(ItemV))
                {
                    await DisplayAlert("Validacion", "Asegurarse de Ingresar el Item", "Aceptar");

                    Item.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(DescriptionV))
                {
                    await DisplayAlert("Validacion", "Asegurarse de Ingresar la Descripcion", "Aceptar");

                    Descripcion.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(UnitV))
                {
                    await DisplayAlert("Validacion", "Asegurarse de Ingresar el Unit", "Aceptar");

                    Unit.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(UsageV))
                {
                    await DisplayAlert("Validacion", "Asegurarse de Ingresar el Usage", "Aceptar");

                    Usage.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(CostV))
                {
                    await DisplayAlert("Validacion", "Asegurarse de Ingresar el Cost", "Aceptar");

                    Costo.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(ExtV))
                {
                    await DisplayAlert("Validacion", "Asegurarse de Ingresar el Ext", "Aceptar");

                    Ext.Focus();
                    return;
                }

                HttpClient client = new HttpClient();
                client.BaseAddress = new Uri(connectionString);

                var BOMSDetalles = new BOMDetalles()
                {
                    BOMDetalleID = 0,
                    BOMID        = BOMDIDV,
                    PartNo       = PartNOV,
                    DIE          = DIEV,
                    Item         = ItemV,
                    Description  = DescriptionV,
                    Unit         = UnitV,
                    Usage        = Convert.ToDecimal(UsageV),
                    Cost         = Convert.ToDecimal(CostV),
                    Ext          = Convert.ToDecimal(ExtV)
                };

                //Convetir a Json
                var           json          = JsonConvert.SerializeObject(BOMSDetalles);
                StringContent stringContent = new StringContent(json, Encoding.UTF8, "application/json");

                //Ejecutar el api el introduces el metodo
                var request = await client.PostAsync("/api/BOMDetalle/registrar", stringContent);

                if (request.IsSuccessStatusCode)
                {
                    var responseJson = await request.Content.ReadAsStringAsync();

                    var respuesta = JsonConvert.DeserializeObject <Request>(responseJson);

                    //Status
                    if (respuesta.status)
                    {
                        await MaterialDialog.Instance.AlertAsync(message : "El Detalle del BOM se registro correctamente",
                                                                 title : "Registro",
                                                                 acknowledgementText : "Aceptar");
                    }
                    else
                    {
                        await MaterialDialog.Instance.AlertAsync(message : "El Detalle del BOM no pudo registrarse correctamente",
                                                                 title : "Registro",
                                                                 acknowledgementText : "Aceptar");
                    }
                }
                else
                {
                    await MaterialDialog.Instance.AlertAsync(message : "Error",
                                                             title : "Error",
                                                             acknowledgementText : "Aceptar");
                }
            }
            catch (Exception ex)
            {
                await MaterialDialog.Instance.AlertAsync(message : ex.Message,
                                                         title : "Error",
                                                         acknowledgementText : "Aceptar");
            }
            await Navigation.PushAsync(new Ingenieria.Ingenieria());
        }
Exemplo n.º 4
0
        private void PrintECNOrPCN()
        {
            try
            {
                string smessage = "";
                drwBll.IsDefaultSubmitRequired = false;
                if (PartNo.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty("Part No."));
                    return;
                }
                //  CheckBox chkdraw = (CheckBox)_mdiChild.FindName("chkprddrawing");
                //      if (_screenType=="PCN")
                //       {
                //chkdraw.Visibility = System.Windows.Visibility.Hidden;
                //       }
                smessage = (_screenType == "ECN" ? "ECN" : "PCN");
                if (PCNSheetNo.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty(smessage + " Number"));
                    return;
                }
                //if (DDPCNECNModel.SFL_DRAW_ISSUENO.ToValueAsString().Trim() == "")
                if (SFLDrawIssueNo.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty("Pro.Seq.Drg.Issue No."));
                    return;
                }

                if (SFLDrawIssueNo1.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty("Pro.Drg.Issue No."));
                    return;
                }
                if (ShowWarningMessage(PDMsg.BeforeCloseForm, MessageBoxButton.OKCancel) == MessageBoxResult.OK)
                {
                    isPrintClicked = true;
                    SaveECNOrPCN();
                }
                else
                {
                    if (AddEnable)
                    {
                        DDPCNECNModel.SNO = (SelectedRow != null) ? SelectedRow["SNO"].ToString().ToIntValue() : 0;
                        //System.Resources.ResourceManager myManager;
                        //myManager = new System.Resources.ResourceManager(typeof(ProcessDesigner.Properties.Resources));
                        //string conStr = myManager.GetString("ConnectionString");

                        //DataAccessLayer dal = new DataAccessLayer(conStr);
                        //DDPCNECNModel.SNO = dal.Get_Ecn_Pcn_Sel_Sno(DDPCNECNModel.PART_NO, _screenType);
                        GetECNMPSDetails();
                    }
                }
                DDPCNECNModel.SFL_DRAW_ISSUENO  = Convert.ToDecimal(SFLDrawIssueNo);
                DDPCNECNModel.SFL_DRAW_ISSUENO1 = Convert.ToDecimal(SFLDrawIssueNo1);
                DDPCNECNModel.PRODUCT_CHANGE_NO = PCNSheetNo;


                DataTable     dtData     = new DataTable();
                List <DD_PCN> lstDDPCN   = new List <DD_PCN>();
                EXHIBIT_DOC   entity     = new EXHIBIT_DOC();
                string        docName    = "ECN";
                string        formatNo   = "";
                string        revisionNo = "";
                lstDDPCN.Add(DDPCNECNModel);
                dtData = Essential.ToDataTable(lstDDPCN);

                if (dtData.Rows.Count > 0)
                {
                    foreach (DataColumn dc in dtData.Columns)
                    {
                        if (dtData.Rows[0][dc].ToValueAsString().Trim() == "")
                        {
                            dtData.Rows[0][dc] = "";
                        }
                    }
                    dtData.Rows[0]["SFL_DRAW_ISSUE_DATE"]    = ReplaceString(dtData.Rows[0]["SFL_DRAW_ISSUE_DATE"].ToValueAsString());
                    dtData.Rows[0]["SFL_DRAW_ISSUEDATE1"]    = ReplaceString(dtData.Rows[0]["SFL_DRAW_ISSUEDATE1"].ToValueAsString());
                    dtData.Rows[0]["DATE_OF_IMPLEMENTATION"] = ReplaceString(dtData.Rows[0]["DATE_OF_IMPLEMENTATION"].ToValueAsString());
                    dtData.Rows[0]["DATE_OF_PCN"]            = ReplaceString(dtData.Rows[0]["DATE_OF_PCN"].ToValueAsString());
                    dtData.Rows[0]["INVOICE_DATE"]           = ReplaceString(dtData.Rows[0]["INVOICE_DATE"].ToValueAsString());
                    dtData.Rows[0]["SIGNATURE_DATE"]         = ReplaceString(dtData.Rows[0]["SIGNATURE_DATE"].ToValueAsString());
                    if (!AddEnable)
                    {
                        dtData.Rows[0]["RE_PPAP"] = RE_PPAP;
                    }
                }

                docName = (_screenType == "ECN" ? "ECN" : "PCN");
                try
                {
                    entity = (from row in drwBll.DB.EXHIBIT_DOC
                              where row.DOC_NAME == docName && (row.DELETE_FLAG == false || row.DELETE_FLAG == null)
                              select row).FirstOrDefault();
                    if (entity != null)
                    {
                        formatNo   = entity.EX_NO.ToValueAsString().Trim();
                        revisionNo = entity.REVISION_NO.ToValueAsString().Trim();
                        //revisionNo = entity.
                    }
                }
                catch (Exception ex1)
                {
                }
                frmReportViewer report = new frmReportViewer(dtData, "ECNPCN", _screenType, formatNo, revisionNo);
                report.ShowDialog();
                if (isPrintClicked)
                {
                    //AddECNOrPCN();
                    isPrintClicked = false;
                }
            }
            catch (Exception ex)
            {
                throw ex.LogException();
            }
        }
Exemplo n.º 5
0
        /// <summary>
        ///
        /// </summary>
        private void SaveECNOrPCN()
        {
            string smessage = "";

            try
            {
                PartNumberIsFocused            = true;
                drwBll.IsDefaultSubmitRequired = true;
                //if (DDPCNECNModel.PART_NO.ToValueAsString().Trim() == "")
                if (PartNo.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty("Part No."));
                    return;
                }

                smessage = (_screenType == "ECN" ? "ECN" : "PCN");
                if (PCNSheetNo.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty(smessage + " Number"));
                    return;
                }
                //if (DDPCNECNModel.SFL_DRAW_ISSUENO.ToValueAsString().Trim() == "")
                if (SFLDrawIssueNo.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty("Pro.Seq.Drg.Issue No."));
                    return;
                }

                if (SFLDrawIssueNo1.ToValueAsString().Trim() == "")
                {
                    ShowInformationMessage(PDMsg.NotEmpty("Pro.Drg.Issue No."));
                    return;
                }

                if (ActionMode == OperationMode.AddNew)
                {
                    LostFocusPartNo();
                }
                //LostFocusPartNo();
                DDPCNECNModel.PART_NO           = PartNo;
                DDPCNECNModel.SFL_DRAW_ISSUENO  = Convert.ToDecimal(SFLDrawIssueNo);
                DDPCNECNModel.SFL_DRAW_ISSUENO1 = Convert.ToDecimal(SFLDrawIssueNo1);
                DDPCNECNModel.PRODUCT_CHANGE_NO = PCNSheetNo;
                if (DDPCNECNModel.PART_NO.ToValueAsString() != "")
                {
                    if (RE_PPAP == true)
                    {
                        DDPCNECNModel.RE_PPAP = true;
                    }
                    else
                    {
                        DDPCNECNModel.RE_PPAP = false;
                    }
                    if (DDPCNECNModel.PART_NO.ToValueAsString().Trim() != "" &&
                        DDPCNECNModel.PRODUCT_CHANGE_NO.ToValueAsString().Trim() != "" &&
                        DDPCNECNModel.SFL_DRAW_ISSUENO.ToValueAsString().Trim() != "")
                    {
                        Progress.ProcessingText = PDMsg.ProgressUpdateText;
                        Progress.Start();
                        drwBll.SaveECNMPSDetails(DDPCNECNModel, DDPCNECNModel.PART_NO, _screenType, ActionMode);

                        Progress.End();
                    }
                    if (ActionMode == OperationMode.AddNew)
                    {
                        ShowInformationMessage(PDMsg.SavedSuccessfully);
                        _logviewBll.SaveLog(DDPCNECNModel.PART_NO, "ECN/PCN");
                    }
                    else
                    {
                        ShowInformationMessage(PDMsg.UpdatedSuccessfully);
                        _logviewBll.SaveLog(DDPCNECNModel.PART_NO, "ECN/PCN");
                    }
                    if (isPrintClicked != true)
                    {
                        // AddECNOrPCN();
                    }
                }

                try
                {
                    if (ActionMode == OperationMode.AddNew)
                    {
                        string oldPartNo     = PartNo;
                        string oldPCNSheetNo = PCNSheetNo;
                        int    i             = 0;
                        PartNumberIsFocused = true;
                        EditECNOrPCN();
                        foreach (DataRowView drView in DvDD_PCN)
                        {
                            if (drView["PRODUCT_CHANGE_NO"].ToString() == oldPCNSheetNo && drView["PART_NO"].ToString() == oldPartNo)
                            {
                                PartNo = oldPartNo;
                                NotifyPropertyChanged("PartNo");
                                SelectedRow = DvDD_PCN[i];
                                SelectChangeComboPart();
                                //NotifyPropertyChanged("SelectedRow");
                                //GetECNMPSDetails();
                                break;
                            }
                            i = i + 1;
                        }
                    }
                }
                catch (Exception ex1)
                {
                }

                //NotifyPropertyChanged("SelectedRow");
            }
            catch (Exception ex)
            {
                throw ex.LogException();
            }
        }
Exemplo n.º 6
0
        private async void BtnModificarOperacionesCalzados_Clicked(object sender, EventArgs e)
        {
            string connectionString = ConfigurationManager.AppSettings["ipServer"];

            try
            {
                var OperacionesCalzadosIDV = operacionesCalzadosID;
                var PartNoV = PartNo.Text;
                var CantidadOperacionesV = cantidadOperaciones.Text;
                var DescripcionV         = descripcion.Text;
                var CostoOperacionalV    = costoOperacional.Text;

                if (string.IsNullOrEmpty(PartNoV))
                {
                    await DisplayAlert("Validacion", "Asegurar que el PartNo de la Operacion del Estilo este ingresado", "Aceptar");

                    PartNo.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(CantidadOperacionesV))
                {
                    await DisplayAlert("Validacion", "Asegurar que la Cantidad de Operaciones del Estilo este ingresado", "Aceptar");

                    cantidadOperaciones.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(DescripcionV))
                {
                    await DisplayAlert("Validacion", "Asegurar que la Descripcion de la Operacion del Estilo este ingresado", "Aceptar");

                    descripcion.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(CostoOperacionalV))
                {
                    await DisplayAlert("Validacion", "Asegurar que el Costo de la Operacion del Estilo este ingresado", "Aceptar");

                    costoOperacional.Focus();
                    return;
                }

                HttpClient client = new HttpClient();
                client.BaseAddress = new Uri(connectionString);

                var operacionesCalzados = new OperacionesCalzado()
                {
                    OperacionesCalzadosID = OperacionesCalzadosIDV,
                    PartNo = PartNoV,
                    CantidadOperaciones = Convert.ToInt32(CantidadOperacionesV),
                    Descripcion         = DescripcionV,
                    CostoOperacional    = Convert.ToDecimal(CostoOperacionalV)
                };

                var           json          = JsonConvert.SerializeObject(operacionesCalzados);
                StringContent stringContent = new StringContent(json, Encoding.UTF8, "application/json");

                var request = await client.PostAsync("/api/OperacionesCalzados/modificar", stringContent);

                if (request.IsSuccessStatusCode)
                {
                    var responseJson = await request.Content.ReadAsStringAsync();

                    var respuesta = JsonConvert.DeserializeObject <Request>(responseJson);

                    if (respuesta.status)
                    {
                        await MaterialDialog.Instance.AlertAsync(message : "La Operacion del Estilo se modifico correctamente",
                                                                 title : "Modificacion",
                                                                 acknowledgementText : "Aceptar");
                    }
                    else
                    {
                        await MaterialDialog.Instance.AlertAsync(message : "La Operacion del Estilo no pudo modificarse correctamente",
                                                                 title : "Modificacion",
                                                                 acknowledgementText : "Aceptar");
                    }
                }
                else
                {
                    await MaterialDialog.Instance.AlertAsync(message : "Error",
                                                             title : "Error",
                                                             acknowledgementText : "Aceptar");
                }
            }
            catch (Exception ex)
            {
                await MaterialDialog.Instance.AlertAsync(message : ex.Message,
                                                         title : ex.Message,
                                                         acknowledgementText : "Aceptar");
            }
            await Navigation.PushAsync(new Ingenieria.Ingenieria());
        }
        private async void BtnGuardarMateriasPrimas_Clicked(object sender, EventArgs e)
        {
            string connectionString = ConfigurationManager.AppSettings["ipServer"];

            try
            {
                var PartNoV           = PartNo.Text;
                var tipoMateriaPrimaV = (TiposMaterialesListView)listaTiposMateriales.SelectedItem;
                var DescripcionV      = Descripcion.Text;
                var UnitV             = Unit.Text;
                var CostV             = Cost.Text;
                var tipoDivisionesV   = (DivisionesMateriasPrimasListView)listaDivisionesMateriasPrimas.SelectedItem;

                if (string.IsNullOrEmpty(PartNoV))
                {
                    await DisplayAlert("Validacion", "Ingrese el PartNo de la Materia Prima", "Aceptar");

                    PartNo.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(tipoMateriaPrimaV.ToString()))
                {
                    await DisplayAlert("Validacion", "Verfique la seleccion del Tipo de Material", "Aceptar");

                    listaTiposMateriales.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(DescripcionV))
                {
                    await DisplayAlert("Validacion", "Ingrese el nombre de la Materia Prima", "Aceptar");

                    Descripcion.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(CostV))
                {
                    await DisplayAlert("Validacion", "Ingrese el Cost de la Materia Prima", "Aceptar");

                    Cost.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(tipoDivisionesV.ToString()))
                {
                    await DisplayAlert("Validacion", "Asegurarse de seleccionar la Division", "Aceptar");

                    listaDivisionesMateriasPrimas.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(UnitV.ToString()))
                {
                    await DisplayAlert("Validacion", "Ingrese el Unit de la Materia Primas", "Aceptar");

                    Unit.Focus();
                    return;
                }

                HttpClient client = new HttpClient();
                client.BaseAddress = new Uri(connectionString);

                var materiasPrimas = new MateriaPrima()
                {
                    Materia_PrimaID        = 0,
                    Tipo_MaterialID        = tipoMateriaPrimaV.Tipo_MaterialID,
                    DivisionMateriaPrimaID = tipoDivisionesV.DivisionMateriaPrimaID,
                    PartNo      = PartNoV,
                    Descripcion = DescripcionV,
                    Unit        = UnitV,
                    Cost        = Convert.ToDecimal(CostV)
                };

                //Convetir a Json
                var           json          = JsonConvert.SerializeObject(materiasPrimas);
                StringContent stringContent = new StringContent(json, Encoding.UTF8, "application/json");

                //Ejecutar el api el introduces el metodo
                var request = await client.PostAsync("/api/MateriasPrimas/registrar", stringContent);

                if (request.IsSuccessStatusCode)
                {
                    var responseJson = await request.Content.ReadAsStringAsync();

                    var respuesta = JsonConvert.DeserializeObject <Request>(responseJson);

                    //Status
                    if (respuesta.status)
                    {
                        await MaterialDialog.Instance.AlertAsync(message : "Materia Prima registrado correctamente",
                                                                 title : "Registro",
                                                                 acknowledgementText : "Aceptar");
                    }
                    else
                    {
                        await MaterialDialog.Instance.AlertAsync(message : "Materia Prima no pudo registrarse correctamente",
                                                                 title : "Registro",
                                                                 acknowledgementText : "Aceptar");
                    }
                }
                else
                {
                    await MaterialDialog.Instance.AlertAsync(message : "Error",
                                                             title : "Error",
                                                             acknowledgementText : "Aceptar");
                }
            }
            catch (Exception ex)
            {
                await MaterialDialog.Instance.AlertAsync(message : ex.Message,
                                                         title : "Error",
                                                         acknowledgementText : "Aceptar");
            }
            limpiarCampos();
            await Navigation.PushAsync(new MateriasPrimas.GestionarMateriasPrimas());
        }
Exemplo n.º 8
0
        private async void BtnGuardarOperacionesCalzados_Clicked(object sender, EventArgs e)
        {
            string connectionString = ConfigurationManager.AppSettings["ipServer"];

            try
            {
                var partNoV = PartNo.Text;
                var cantidadOperacionesV = cantidadOperaciones.Text;
                var descripcionV         = descripcion.Text;
                var costoOperacionalV    = costoOperacional.Text;

                if (string.IsNullOrEmpty(partNoV))
                {
                    await DisplayAlert("Validacion", "Ingrese el PartNo", "Aceptar");

                    PartNo.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(cantidadOperacionesV))
                {
                    await DisplayAlert("Validacion", "Ingrese las Cantidades de Operaciones", "Aceptar");

                    cantidadOperaciones.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(descripcionV))
                {
                    await DisplayAlert("Validacion", "Ingrese la Descripcion", "Aceptar");

                    descripcion.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(costoOperacionalV))
                {
                    await DisplayAlert("Validacion", "Ingrese el Costo Operacional", "Aceptar");

                    costoOperacional.Focus();
                    return;
                }

                //Con HttpClient se realiza la conexion a la base de datos:
                HttpClient client = new HttpClient();
                client.BaseAddress = new Uri(connectionString);

                var operacionesCalzados = new OperacionesCalzado()
                {
                    OperacionesCalzadosID = 0,
                    PartNo = partNoV,
                    CantidadOperaciones = Convert.ToInt32(cantidadOperacionesV),
                    Descripcion         = descripcionV,
                    CostoOperacional    = Convert.ToDecimal(costoOperacionalV),
                };

                //Convetir a Json
                var           json          = JsonConvert.SerializeObject(operacionesCalzados);
                StringContent stringContent = new StringContent(json, Encoding.UTF8, "application/json");

                //Ejecutar el api el introduces el metodo
                var request = await client.PostAsync("/api/OperacionesCalzados/registrar", stringContent);

                if (request.IsSuccessStatusCode)
                {
                    var responseJson = await request.Content.ReadAsStringAsync();

                    var respuesta = JsonConvert.DeserializeObject <Request>(responseJson);

                    //Status
                    if (respuesta.status)
                    {
                        await MaterialDialog.Instance.AlertAsync(message : "Operacion de Calzado registrado correctamente",
                                                                 title : "Registro",
                                                                 acknowledgementText : "Aceptar");
                    }
                    else
                    {
                        await MaterialDialog.Instance.AlertAsync(message : "Operacion de Calzado no pudo registrarse correctamente",
                                                                 title : "Registro",
                                                                 acknowledgementText : "Aceptar");
                    }
                }
                else
                {
                    await MaterialDialog.Instance.AlertAsync(message : "Error",
                                                             title : "Error",
                                                             acknowledgementText : "Aceptar");
                }
            }
            catch (Exception ex)
            {
                await MaterialDialog.Instance.AlertAsync(message : ex.Message,
                                                         title : "Error",
                                                         acknowledgementText : "Aceptar");
            }
            limpiarCampos();
            await Navigation.PushAsync(new Ingenieria.Ingenieria());
        }