Please explain this code in dot net. I am unable to understand it


#1

The code I have shared with you but I cant understand what are its functionality. Plz help me with this.


DataTable dtResult = new DataTable();
                   DataTableSuccess oDataTableWStatus = new DataTableSuccess();
                   int nArgCnt = 0, nArgIncre = 0;
                   if (oServiceParams.oProcParams != null)
                       nArgCnt = oServiceParams.oProcParams.Count;
                   if (oServiceParams.oEncryptedArgs != null)
                       nArgCnt = nArgCnt + oServiceParams.oEncryptedArgs.Count;

                   SqlParameter[] arlParams = new SqlParameter[nArgCnt];
                   if (oServiceParams.oProcParams != null)
                   {
                       for (int j = 0; j < oServiceParams.oProcParams.Count; j++)
                       {
                           arlParams[nArgIncre] = new SqlParameter(("@" + oServiceParams.oProcParams[j].strKey), oServiceParams.oProcParams[j].strArgmt);
                           nArgIncre = nArgIncre + 1;
                       }
                   }

                   if (oServiceParams.oEncryptedArgs != null)
                   {
                       for (int j = 0; j < oServiceParams.oEncryptedArgs.Count; j++)
                       {
                           arlParams[nArgIncre] = new SqlParameter(("@" + oServiceParams.oEncryptedArgs[j].strKey), oServiceParams.oEncryptedArgs[j].strArgmt);
                           nArgIncre = nArgIncre + 1;
                       }
                   }

                   DataSet dsResult = new DataSet();
                   if (nArgCnt != 0)
                       dsResult = SQLHelper.ExecuteDataset(oServiceParams.strProc, arlParams);
                   else
                       dsResult = SQLHelper.ExecuteDataset(oServiceParams.strProc);

                   oDataTableWStatus.status = dsResult.Tables[0].Rows[0][0].ToString();
                   oDataTableWStatus.message = dsResult.Tables[1].Rows[0][0].ToString();
                   oDataTableWStatus.details = dsResult.Tables[2];

                   SmsMailHelper.kupukoo_subs_mail(dsResult.Tables[2].Rows[0][1].ToString());
                   SmsMailHelper.kupukoo_subs_mail1(dsResult.Tables[2].Rows[0][1].ToString(), dsResult.Tables[2].Rows[0][0].ToString());

                   var response = oDataTableWStatus;
                   return Request.CreateResponse(HttpStatusCode.OK, response, Configuration.Formatters.JsonFormatter);

#2

Someone please help her.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.