当前位置: 首页>>代码示例>>C#>>正文


C# WSGestion.WSGestion.SEL_GRID_BY_ID_Articulo_For_Inventario方法代码示例

本文整理汇总了C#中WSGestion.WSGestion.SEL_GRID_BY_ID_Articulo_For_Inventario方法的典型用法代码示例。如果您正苦于以下问题:C# WSGestion.WSGestion.SEL_GRID_BY_ID_Articulo_For_Inventario方法的具体用法?C# WSGestion.WSGestion.SEL_GRID_BY_ID_Articulo_For_Inventario怎么用?C# WSGestion.WSGestion.SEL_GRID_BY_ID_Articulo_For_Inventario使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WSGestion.WSGestion的用法示例。


在下文中一共展示了WSGestion.WSGestion.SEL_GRID_BY_ID_Articulo_For_Inventario方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Carga_Lineas

        private void Carga_Lineas()
        {
            WSGestion.WSGestion wsgest = new WSGestion.WSGestion();
            wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");
            DataTable dt = new DataTable();
            dt = (DataTable)Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Lineas"];

            try
            {
                WSGestion.MOD_Articulo obj = new WSGestion.MOD_Articulo();

                obj = wsgest.SEL_GRID_BY_ID_Articulo_For_Inventario(buscar, centro_seleccionado, sucursal_seleccionado,bodega_seleccionado);

                if (obj.CEA_nombre != null)
                {
                    WSGestion.MOD_Detalle_Entrada_Inventario obj2 = new WSGestion.MOD_Detalle_Entrada_Inventario();
                    obj2.DET_ent_inv_id_linea = ult_linea;
                    obj2.DET_ent_inv_id_entrada_inventario = codigo_seleccionado;
                    obj2.DET_ent_inv_id_centro_atencion = centro_seleccionado;
                    obj2.DET_ent_inv_id_articulo = obj.ART_id_articulo;
                    obj2.DET_ent_inv_cantidad = Convert.ToDouble(txt_cantidad.Value, CultureInfo.CreateSpecificCulture("en-US"));
                    int valor = wsgest.CRE_Detalle_Entrada_Inventario(obj2);
                    if (valor==1)
                    {
                        dt.Rows.Add(ult_linea, obj.ART_id_articulo, obj.ART_descripcion, Convert.ToDecimal(txt_cantidad.Value));
                        Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"ULT_Linea"] = dt.Rows.Count.ToString();
                    }
                    else
                    {
                        if (valor==2)
                        {
                            foreach (DataRow row in dt.Rows)
                            {

                                    if (row["Artículo"].ToString() == obj.ART_id_articulo.ToString())
                                    {
                                        row["Cantidad"] = (Convert.ToDecimal(row["Cantidad"].ToString()) + Convert.ToDecimal(txt_cantidad.Value)).ToString(CultureInfo.CreateSpecificCulture("en-US"));
                                    }

                            }
                        }
                        else
                        {
                            Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Error"] = "Se produjo un error en la ejecución de la sentencia en la base de datos";
                        }

                    }

                }
                else
                {
                    Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Error"] = "Artículo digitado no se encuentra en la base de datos o bien no pertenece a la bodega del documento";
                }

                gridview_lineas.DataSource = dt;
                gridview_lineas.DataBind();
            }
            catch (Exception exc)
            {
                Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Error"] = "Error: " + exc.ToString();
            }
        }
开发者ID:juahidma,项目名称:petnet-web,代码行数:62,代码来源:frm_Grid_Detalle_Entrada_Inventario.aspx.cs

示例2: Editar_Lineas

        private void Editar_Lineas()
        {
            WSGestion.WSGestion wsgest = new WSGestion.WSGestion();
            wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");
            DataTable dt = new DataTable();
            dt = (DataTable)Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Lineas"];

            try
            {

                WSGestion.MOD_Articulo obj = new WSGestion.MOD_Articulo();

                obj = wsgest.SEL_GRID_BY_ID_Articulo_For_Inventario(buscar, centro_seleccionado, sucursal_seleccionado, bodega_seleccionado);

                if (obj.CEA_nombre != null)
                {
                    WSGestion.MOD_Detalle_Entrada_Inventario obj2 = new WSGestion.MOD_Detalle_Entrada_Inventario();
                    obj2.DET_ent_inv_id_linea = Convert.ToInt32 (txt_linea.Value);
                    obj2.DET_ent_inv_id_entrada_inventario = codigo_seleccionado;
                    obj2.DET_ent_inv_id_centro_atencion = centro_seleccionado;
                    obj2.DET_ent_inv_id_articulo = obj.ART_id_articulo;
                    obj2.DET_ent_inv_cantidad = Convert.ToDouble(txt_cantidad.Value, CultureInfo.CreateSpecificCulture("en-US"));
                    wsgest.UPD_Detalle_Entrada_Inventario(obj2);

                    dt.Rows[Convert.ToInt32(txt_linea.Value) - 1]["Artículo"] = obj.ART_id_articulo.ToString();
                    dt.Rows[Convert.ToInt32(txt_linea.Value) - 1]["Descripción"] = obj.ART_descripcion.ToString();
                    dt.Rows[Convert.ToInt32(txt_linea.Value) - 1]["Cantidad"] = txt_cantidad.Value.ToString(CultureInfo.CreateSpecificCulture("en-US"));
                }
                else
                {
                    Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Error"] = "Artículo digitado no se encuentra en la base de datos";
                }

                gridview_lineas.DataSource = dt;
                gridview_lineas.DataBind();

            }
            catch (Exception exc)
            {
                Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Error"] = exc.ToString();
            }
        }
开发者ID:juahidma,项目名称:petnet-web,代码行数:42,代码来源:frm_Grid_Detalle_Entrada_Inventario.aspx.cs

示例3: Editar_Lineas

        private void Editar_Lineas()
        {
            WSGestion.WSGestion wsgest = new WSGestion.WSGestion();
            wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");
            DataTable dt = new DataTable();
            dt = (DataTable)Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Lineas"];

            try
            {
                wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");
                WSGestion.MOD_Articulo obj = new WSGestion.MOD_Articulo();

                obj = wsgest.SEL_GRID_BY_ID_Articulo_For_Inventario(buscar, centro_seleccionado, sucursal_seleccionado, bodega_seleccionado);

                if (obj.CEA_nombre != null)
                {
                    dt.Rows[Convert.ToInt32(txt_linea.Value) - 1]["Artículo"] = obj.ART_id_articulo.ToString();
                    dt.Rows[Convert.ToInt32(txt_linea.Value) - 1]["Descripción"] = obj.ART_descripcion.ToString();
                    dt.Rows[Convert.ToInt32(txt_linea.Value) - 1]["Cantidad"] = txt_cant_bodega.Value;
                }
                else
                {
                    Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Error"] = "Error: Artículo digitado no se encuentra en la base de datos";
                }

                gridview_lineas.DataSource = dt;
                gridview_lineas.DataBind();

            }
            catch (Exception exc)
            {
                Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Error"] = "Error: " + exc.ToString();
            }
        }
开发者ID:juahidma,项目名称:petnet-web,代码行数:34,代码来源:frm_Bodega_Articulo.aspx.cs


注:本文中的WSGestion.WSGestion.SEL_GRID_BY_ID_Articulo_For_Inventario方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。