Exemple #1
0
        public DataTable SaveData(PL_LeaveMaster plobj)
        {
            DL_LeaveMaster objdl = new DL_LeaveMaster();
            DataTable      dt    = new DataTable();

            if (plobj.Ind == 0)
            {
                return(dt);
            }
            else
            {
                dt = objdl.Save_LeaveMaster(plobj);
                return(dt);
            }
        }
 internal DataTable Save_LeaveMaster(PL_LeaveMaster plobj)
 {
     try
     {
         con             = Connection.SetConnection();
         cmd             = new SqlCommand("SPLeaveMaster", con);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@Ind", plobj.Ind);
         cmd.Parameters.AddWithValue("@CityCode", plobj.CITYCODE);
         cmd.Parameters.AddWithValue("@LvDesc", plobj.LvDesc);
         cmd.Parameters.AddWithValue("@LvAbrDesc", plobj.LvAbrDesc);
         cmd.Parameters.AddWithValue("@MaxLimitLife", plobj.MaxLimitLife);
         da = new SqlDataAdapter(cmd);
         dt = new DataTable();
         da.Fill(dt);
         return(dt);
     }
     catch { return(dt); }
     finally
     {
         con.Close();
         con.Dispose();
     }
 }