Esempio n. 1
0
        public int UpdateLockStatus(LockRelease.Updatelist _ObjData)
        {
            DataTable dtTable = new DataTable();

            dtTable.Columns.Add("Region_Code", typeof(string));
            dtTable.Columns.Add("Month", typeof(int));
            dtTable.Columns.Add("Year", typeof(int));
            dtTable.Columns.Add("Remarks", typeof(string));
            dtTable.Columns.Add("Actual_released_By", typeof(string));
            if (_ObjData.lstLockedDetails != null && _ObjData.lstLockedDetails.Count > 0)
            {
                for (int i = 0; i < _ObjData.lstLockedDetails.Count(); i++)
                {
                    dtTable.Rows.Add(_ObjData.lstLockedDetails[i].Region_Code, _ObjData.lstLockedDetails[i].Month, _ObjData.lstLockedDetails[i].Year, _ObjData.lstLockedDetails[i].Remarks, _ObjData.lstLockedDetails[i].Actual_released_By);
                }
            }
            return(_objDL_LockRelease.UpdateLockStatus(_ObjData, dtTable));
        }
Esempio n. 2
0
        public int UpdateLockStatus(LockRelease.Updatelist _ObjData, DataTable dtTable)
        {
            int result = 1;
            int save   = 0;

            try
            {
                string     cmdTxt  = "SP_HD_SS_LockStatus_Update";
                SqlCommand command = new SqlCommand(cmdTxt);
                command.CommandType = CommandType.StoredProcedure;
                //var p = new DynamicParameters();

                //_objSPData.AddParamToSqlCommand(command, "@Region_Code", ParameterDirection.Input, SqlDbType.VarChar, 30, _ObjData.Region_Code);

                _objSPData.AddParamToSqlCommand(command, "@Company_Code", ParameterDirection.Input, SqlDbType.VarChar, 30, _ObjData.Company_Code);
                _objSPData.AddParamToSqlCommand(command, "@User_Code", ParameterDirection.Input, SqlDbType.VarChar, 30, _ObjData.User_Code);
                _objSPData.AddParamToSqlCommand(command, "@subDomainName", ParameterDirection.Input, SqlDbType.VarChar, 30, _ObjData.subDomainName);
                _objSPData.AddParamToSqlCommand(command, "@LockType", ParameterDirection.Input, SqlDbType.VarChar, 30, _ObjData.LockType);
                _objSPData.AddParamToSqlCommand(command, "@RegionName", ParameterDirection.Input, SqlDbType.VarChar, 30, _ObjData.RegionName);
                //_objSPData.AddParamToSqlCommand(command, "@Year", ParameterDirection.Input, SqlDbType.Int, 8, _ObjData.Year);
                _objSPData.AddParamToSqlCommand(command, "@Result", ParameterDirection.Output, SqlDbType.Int, 8, "");
                if (dtTable != null)
                {
                    _objSPData.AddParamToSqlCommandWithTypeName(command, "@TVP_SS_Update_Lock_Details", ParameterDirection.Input, SqlDbType.Structured, dtTable, "TVP_SS_Update_Lock_Details");
                }
                else
                {
                    _objSPData.AddParamToSqlCommandWithTypeName(command, "@TVP_SS_Update_Lock_Details", ParameterDirection.Input, SqlDbType.Structured, null, "TVP_SS_Update_Lock_Details");
                }
                //_objData.OpenConnection();
                _objData.ExecuteNonQuery(command, _ObjData.subDomainName);
                result = Convert.ToInt32(command.Parameters["@Result"].Value);
            }
            catch (Exception ex)
            {
                throw;
            }
            return(result);
        }
Esempio n. 3
0
 public int UpdateLockStatus(LockRelease.Updatelist _ObjData)
 {
     return(_objBL_LockRelease.UpdateLockStatus(_ObjData));
 }