Ejemplo n.º 1
0
        protected override bool Save()
        {
            //return base.Save();
            gvEmp.CloseEditor();
            binData.EndEdit();
            if (SavePre() == false)
            {
                return(false);
            }
            DataSet ds    = ((DataView)binData.DataSource).Table.DataSet;
            DataSet dsEmp = ((DataView)gcEmp.DataSource).Table.DataSet;

            DataSet[] dsData = new DataSet[2];
            dsData[0] = ds;
            dsData[1] = dsEmp;

            string[] strSQL = new string[2];
            strSQL[0] = strSaveSlaverSQL;
            strSQL[1] = "select * from t_WageEmp";

            DataLib.DataHelper myHelper = new DataLib.DataHelper();

            if (myHelper.SaveMuteData(dsData, strSQL).Length == 0)
            {
                ds.AcceptChanges();
                dsEmp.AcceptChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        protected override bool Save()
        {
            binData.EndEdit();
            if (SavePre() == false)
            {
                return(false);
            }
            DataSet dsMaster = ((DataView)binData.DataSource).Table.DataSet;
            DataSet dsSlaver = ((DataView)gcDetail.DataSource).Table.DataSet;

            foreach (DataRow dr in dsSlaver.Tables[0].Rows)
            {
                dr["F_ID"] = editControl1.GetValue().ToString();
            }

            DataLib.DataHelper myHelper = new DataLib.DataHelper();

            DataSet[] dsData = new DataSet[2];
            dsData[0] = dsMaster;
            dsData[1] = dsSlaver;

            string[] strMSQL = new string[2];
            strMSQL[0] = strSQL;
            strMSQL[1] = strSlaverSQL;

            if (myHelper.SaveMuteData(dsData, strMSQL).Length == 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
        protected override bool Save()
        {
            binData.EndEdit();
            if (SavePre() == false)
            {
                return(false);
            }
            gvEmp.CloseEditor();

            DataSet[] dsSave = new DataSet[2];

            DataSet ds = ((DataView)binData.DataSource).Table.DataSet;

            dsSave[0] = ds;
            dsSave[1] = ((DataTable)binEmp.DataSource).DataSet;

            string[] SQL = new string[2];
            SQL[0] = "select * from t_OANotice";
            SQL[1] = "select * from t_OANoticeEmp";

            DataLib.DataHelper myHelper = new DataLib.DataHelper();
            if (myHelper.SaveMuteData(dsSave, SQL).Length == 0)
            {
                ds.AcceptChanges();
                ((DataTable)binEmp.DataSource).DataSet.AcceptChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }