protected void Edit_Screen()
        {
            ComLibrary com = new ComLibrary();
            Message    msg = new Message(g_user_id, g_lang);
            Rcv        rc  = new Rcv(g_user_id, g_lang);
            DataSet    ds  = new DataSet();

            gdvDetail.DataSource = null;
            gdvDetail.DataBind();
            ViewState["gdvDetail"] = null;

            //rc.catg_cd = rdoTYPE.SelectedValue;

            //ds = rc.Get_Pur_RcvNoInspList2();
            //if (ds == null)
            //{
            //    lblMsg.Text = rc.strErr;
            //    lblMsg.ForeColor = Color.Red;
            //    return;
            //}
            //if (ds.Tables[0].Rows.Count == 0)
            //{
            //    lblMsg.Text = msg.GetMessage("DATA_NOT_EXIST_ERR");
            //    lblMsg.ForeColor = Color.Red;
            //    return;
            //}
            //else
            //{
            //    DataTable dt = ds.Tables[0];
            //    ViewState["gdvDetail"] = dt;
            //    Edit_Grid();
            //}
        }
Beispiel #2
0
        /// <summary>
        /// 受信正常API
        /// </summary>
        /// <param name="api"></param>
        public void API_OK(Rcv api)
        {
            switch (api)
            {
            case Rcv.DevDataRcv:
                APIDeviceDataOkResponse();
                break;

            case Rcv.UserAuthRcv:
                APIUserAuthOkResponse();
                break;
            }
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Rcv r = new Rcv(4);

            r.Val = 11;

            Console.WriteLine("R = " + r.Row.ToString() + " C = " + r.Col.ToString());

            r.Row = 1; r.Col = 2;

            Console.WriteLine("V = " + r.Val.ToString());

            Console.ReadKey();
        }
Beispiel #4
0
        protected void cmdSave_Click(object sender, EventArgs e)
        {
            ComDB      db    = new ComDB();
            ComLibrary comlb = new ComLibrary();
            Message    msg   = new Message(g_user_id, g_lang);
            ComLibrary com   = new ComLibrary();
            DataSet    ds    = new DataSet();
            Rcv        rc1   = new Rcv(g_user_id, g_lang);
            int        rtn   = 0;

            if (txtITEM_NO.Text == "")
            {
                lblMsg.Text      = msg.GetMessage("ITEM_NOT_EXIST_ERR");
                lblMsg.ForeColor = Color.Red;
                return;
            }
            ds = rc1.GetPartNo(txtITEM_NO.Text);
            if (ds == null || ds.Tables[0].Rows.Count == 0)
            {
                lblMsg.Text      = msg.GetMessage("ITEM_NOT_EXIST_ERR");
                lblMsg.ForeColor = Color.Red;
                return;
            }
            if (!comlb.IsNumeric(txtRCV_QTY.Text.ToString()))
            {
                lblMsg.Text      = "Receive Qty Error";
                lblMsg.ForeColor = Color.Red;
                return;
            }

            rc1.part_no     = txtITEM_NO.Text;
            rc1.receive_qty = com.StringToInt(txtRCV_QTY.Text);
            rc1.optmethod   = "PC";
            rtn             = rc1.Insert();
            if (rtn == ComConst.FAILED)
            {
                lblMsg.Text      = rc1.strErr;
                lblMsg.ForeColor = Color.Red;
                return;
            }
            lblMsg.Text      = msg.GetMessage("NORMAL_UPDATE");
            lblMsg.ForeColor = Color.Blue;
            txtITEM_NO.Text  = "";
            txtRCV_QTY.Text  = "";
        }
Beispiel #5
0
        private void Calcular_Click(object sender, EventArgs e)
        {
            double Aguinaldo, Vacaciones, Prima, Infonavit, Imss, Rcv;
            double Sgmm, Sgmmd, Vales, Comedor, Seguro, Personal, Sick;
            double Saldo, Ley, Empresa, Total;

            Aguinaldo  = (Convert.ToDouble(aguinaldo.Text) * (Convert.ToDouble(saldo1.Text))) / 100;
            Vacaciones = (Convert.ToDouble(vacaciones.Text) * (Convert.ToDouble(saldo1.Text))) / 100;
            Prima      = (Convert.ToDouble(prima.Text) * (Convert.ToDouble(saldo1.Text))) / 100;
            Infonavit  = (Convert.ToDouble(infonavit.Text) * (Convert.ToDouble(saldo1.Text))) / 100;
            Imss       = (Convert.ToDouble(imss.Text) * (Convert.ToDouble(saldo1.Text))) / 100;
            Rcv        = (Convert.ToDouble(rcv.Text) * (Convert.ToDouble(saldo1.Text))) / 100;
            Sgmm       = (Convert.ToDouble(sgmm.Text) * (Convert.ToDouble(saldo1.Text))) / 100;
            Sgmmd      = Sgmm * (Convert.ToDouble(dependents.Text));
            Vales      = (Convert.ToDouble(vales.Text) * (Convert.ToDouble(saldo1.Text))) / 100;
            Comedor    = Convert.ToDouble(comedor.Text);
            Seguro     = Convert.ToDouble(seguro.Text);
            Personal   = Convert.ToDouble(personal.Text);
            Sick       = Convert.ToDouble(sick.Text);

            aguinaldo2.Text  = Aguinaldo.ToString("C");
            vacaciones2.Text = Vacaciones.ToString("C");
            prima2.Text      = Prima.ToString("C");
            infonavit2.Text  = Infonavit.ToString("C");
            imss2.Text       = Imss.ToString("C");
            rcv2.Text        = Rcv.ToString("C");
            sgmm2.Text       = Sgmm.ToString("C");
            sgmmd2.Text      = Sgmmd.ToString("C");
            vales2.Text      = Vales.ToString("C");
            comedor2.Text    = Comedor.ToString("C");
            seguro2.Text     = Seguro.ToString("C");
            personal2.Text   = Personal.ToString("C");
            sick2.Text       = Sick.ToString("C");

            Saldo   = Convert.ToDouble(saldo1.Text);
            Ley     = Aguinaldo + Vacaciones + Prima + Infonavit + Imss + Rcv;
            Empresa = Sgmm + Sgmmd + Vales + Comedor + Seguro + Personal + Sick;;
            Total   = Saldo + Empresa + Ley;

            saldo2.Text  = Saldo.ToString("C");
            ley.Text     = Ley.ToString("C");
            empresa.Text = Empresa.ToString("C");
            total.Text   = Total.ToString("C");
        }